Example #1
0
 public static function GetByName($name)
 {
     global $MySQL;
     $query = "SELECT * FROM " . System::$Configuration["Database.TablePrefix"] . "Pages WHERE page_Name = '" . $MySQL->real_escape_string($name) . "'";
     $result = $MySQL->query($query);
     $values = $result->fetch_assoc();
     return Page::GetByAssoc($values);
 }
Example #2
0
            $item = Place::GetByAssoc($values);
            echo "{ \"Category\": \"Places\", \"Item\": ";
            echo $item->ToJSON();
            echo " }";
            if ($i + $previousCount < $totalCount - 1) {
                echo ", ";
            }
        }
    });
}
if ($availableTables["Pages"]) {
    $lookupTables[] = new LookupTable("Pages", "page_Title", function ($table, $totalCount, $previousCount) {
        $result = $table->Result;
        for ($i = 0; $i < $result->num_rows; $i++) {
            $values = $result->fetch_assoc();
            $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);