Advertisement
Guest User

Untitled

a guest
May 2nd, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <?php
  2. $mysqli = new mysqli("x", "w", "y", "z");
  3. $coresite = "Abbasya";
  4. $rowx = "103";
  5. $columnx = "3";
  6. $directionx = "Back";
  7. if($stmt = $mysqli->prepare("SELECT CABOwner, EtisaatTeam FROM CAB WHERE (SiteName=? AND Row=? AND Col=? AND Direction=?)"))
  8. {
  9. $stmt->bind_param("ssss", $coresite, $rowx, $columnx, $directionx);
  10. $stmt->execute();
  11. $stmt->bind_result($cabinet);
  12. while ($stmt->fetch())
  13. {
  14. echo json_encode($cabinet).",";
  15. }
  16. $stmt->close();
  17. }
  18. else{
  19. $mysqli->close();
  20. }
  21.  
  22. <?php
  23. $mysqli = new mysqli("x", "w", "y", "z");
  24. $coresite = "Abbasya";
  25. $rowx = "103";
  26. if($stmt = $mysqli->prepare("SELECT DISTINCT Col FROM CAB WHERE (SiteName=? AND Row=?)"))
  27. {
  28. $stmt->bind_param("ss", $coresite, $rowx);
  29. $stmt->execute();
  30. $stmt->bind_result($Col);
  31. while ($stmt->fetch())
  32. {
  33. echo json_encode($Col).",";
  34. }
  35. $stmt->close();
  36. }
  37. else{
  38. $mysqli->close();
  39. }
  40. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement