Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. if($stmt->execute()) {
  2. $result = $stmt->get_result();
  3. $numRows = $result->num_rows;
  4.  
  5. if($numRows > 0) {
  6. while($row = $result->fetch_assoc()) {
  7. array_push($dtbOutput, ["lines" => $numRows]);
  8. $dtbOutput[] = $row;
  9. }
  10. } else {
  11. $dtbOutput = [["lines" => $numRows]];
  12. }
  13. } else {
  14. throw new Exception("Chyba v 'stmt_get' u".$stmt->error);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement