Guest User

Untitled

a guest
Feb 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. SELECT * FROM Menu WHERE ID IN ([Array of IDs])
  2.  
  3. public function basket($ids) {
  4. require dirname(__FILE__) . '/../../dbconnect.php';
  5. $sql = "SELECT * FROM `Menu` WHERE `ID` IN (:ids)";
  6. $stmt = $pdo->prepare($sql);
  7. $stmt->bindValue(':ids',$ids);
  8. $stmt->execute();
  9. $result = $stmt->fetchAll();
  10. echo json_encode($result);
  11. }
Add Comment
Please, Sign In to add comment