public static function Get($max = null) { global $MySQL; $query = "SELECT * FROM " . System::$Configuration["Database.TablePrefix"] . "Tasks"; $result = $MySQL->query($query); $count = $result->num_rows; $retval = array(); for ($i = 0; $i < $count; $i++) { $values = $result->fetch_assoc(); $retval[] = Task::GetByAssoc($values); } return $retval; }
$item = Page::GetByAssoc($values); echo "{ \"Category\": \"Pages\", \"Item\": "; echo $item->ToJSON(); echo " }"; if ($i + $previousCount < $totalCount - 1) { echo ", "; } } }); } if ($availableTables["Tasks"]) { $lookupTables[] = new LookupTable("Tasks", "task_Title", function ($table, $totalCount, $previousCount) { $result = $table->Result; for ($i = 0; $i < $result->num_rows; $i++) { $values = $result->fetch_assoc(); $item = Task::GetByAssoc($values); echo "{ \"Category\": \"Tasks\", \"Item\": "; echo $item->ToJSON(); echo " }"; if ($i + $previousCount < $totalCount - 1) { echo ", "; } } }); } if ($availableTables["StartPages"]) { $lookupTables[] = new LookupTable("StartPages", "startpage_Title", function ($table, $totalCount, $previousCount) { $result = $table->Result; for ($i = 0; $i < $result->num_rows; $i++) { $values = $result->fetch_assoc(); $item = StartPage::GetByAssoc($values);