Пример #1
0
     // ... # of conditions is variable
     $q_SupportTickets->lang = "en";
     // ... in English, please
     $q_SupportTickets->primary_key = "id";
     // let Query engine know primary key
     $q_SupportTickets->default_query = $db->qi("id") . "!='0' desc";
     // let Query engine know primary key
     $sess->register("q_SupportTickets");
     // and don't forget this!
 }
 if ($rowcount) {
     $q_SupportTickets->start_row = $startingwith;
     $q_SupportTickets->row_count = $rowcount;
 }
 if ($submit == 'Search') {
     $query = $q_SupportTickets->search($t->map_cols);
 }
 // When we hit that page a second time, the array named
 // by $base will be set and we must generate the $query.
 // Ah, and don\'t set $base to "q" when $q is your Sql_Query
 // object... :-)
 if (array_key_exists("x", $_POST)) {
     get_request_values("x");
     $query = $q_SupportTickets->where("x", 1);
     $hideQuery = "";
 } else {
     $hideQuery = "style='display:none'";
 }
 if (!$sortorder) {
     $sortorder = "id";
 }