Guest User

Untitled

a guest
Jan 24th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. $query = "SELECT guid, name, location, description, datetime FROM event";
  2.  
  3. $result = doSQLTermError($db_connect, $query);
  4.  
  5. while($obj = mysqli_fetch_object($result)){
  6. $guid = $obj->guid;
  7.  
  8. $event_details = new stdClass;
  9.  
  10. $event_details->$guid = new stdClass;
  11. $event_details->$guid->name = $obj->name;
  12. $event_details->$guid->location = $obj->location;
  13. $event_details->$guid->description = $obj->description;
  14. $event_details->$guid->datetime = $obj->datetime;
  15. }
  16.  
  17. $event = json_encode($event_details);
  18.  
  19. "data":
  20. {
  21. "f4ef863ef80b07036de08457ccdf51e3f814":
  22. {
  23. "name":"adsg",
  24. "location":"uhjty;",
  25. "description":"y;hy",
  26. "datetime":"2018-01-01 00:00:00"
  27. }
  28. }
Add Comment
Please, Sign In to add comment