Advertisement
Guest User

Untitled

a guest
Jun 11th, 2021
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. function loadAllRes(){
  2.  
  3.     $query = [
  4.       "key" => "R.reservation_id",
  5.       "from" => "ws_reservations R INNER JOIN ws_persons P ON R.reservation_id = P.reservation_id",
  6.       "columns" => array(
  7.           array( 'db' => 'R.reservation_id', 'dt' => 0 ),
  8.           array( 'db' => 'R.reservation_id', 'dt' => 1 ),
  9.           array( 'db' => 'concat(firstname, " ", lastname)', 'dt' => 2, 'as' => 'name'),
  10.           array( 'db' => 'concat(section, " - ", grave)','dt' => 3 , 'as' => 'location'),
  11.           array( 'db' => 'R.res_date', 'dt' => 4 ),
  12.       ),
  13.       "where" => "is_vet = 1",
  14.     ];
  15.  
  16.     $whereR = (!isset($query['where'])) ? null : $query['where'];
  17.     echo json_encode(
  18.       SSP::complex( $_POST, $query['key'], $query['from'], $query['columns'], $whereR, null)
  19.     );
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement