如果SortingMethodId等於3,6或7,則嘗試設置show_hours爲true的變量。現在只有當SortingMethodId等於3(來自MySQL數據庫)時才如此,如下所示:嘗試從sql字段設置php變量
$this->data["show_hours"] = ($company->getSortingMethodId() == 3);
所以,我想:
$this->data["show_hours"] = ($company->getSortingMethodId() == 3 OR == 6 OR == 7);
,只返回一個錯誤....想法?我只是想湊了在我們的應用中的一些現有的代碼是初學者,所以很容易:)
在發佈未來出現的問題,請記住,包括錯誤說什麼,因爲這將在確定問題:) – Ren