Advertisement
Guest User

S

a guest
Dec 18th, 2013
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function doSomeQueries()
  2. {
  3.     if($stmt = $mysqli->prepare("INSERT INTO table VALUES (?, ?, ?);"))
  4.     {
  5.         $stmt->bind_param("sss", $a, $b, $c);
  6.  
  7.             if(!$stmt->execute())
  8.             {
  9.                 sendMail("mysqliError");
  10.             }
  11.  
  12.             $stmt->close();
  13.     }
  14.     else
  15.     {
  16.             sendMail("mysqliError");
  17.     }
  18.  
  19.  
  20.  
  21.  
  22.     if($stmt = $mysqli->prepare("INSERT INTO table VALUES (?);"))
  23.     {
  24.         $stmt->bind_param("s", $a);
  25.  
  26.             if(!$stmt->execute())
  27.             {
  28.                 sendMail("mysqliError");
  29.             }
  30.  
  31.             $stmt->close();
  32.     }
  33.     else
  34.     {
  35.             sendMail("mysqliError");
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement