Guest User

Untitled

a guest
Oct 20th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. email REGEXP "^[a-k]"? yes
  2. email REGEXP "^[a-g]"? yes
  3. email REGEXP "^[a-d]"? no
  4. email REGEXP "^[e-g]"? yes, no need to ask!
  5.  
  6. DELETE FROM posts WHERE id=1234 OR 1 -- LIMIT 1
  7.  
  8. $stmt = $conn->prepare("INSERT INTO MyGuests (firstname, lastname, email) VALUES (?, ?, ?)");
  9. $stmt->bind_param("sss", $firstname, $lastname, $email);
  10. $stmt->execute();
  11.  
  12. $req = $bdd->prepare('INSERT INTO decisions(decision, numero, publique, date, ip) VALUES(:decision, :numero, :publique, NOW(), :ip)');
  13. $req->execute(array(
  14. 'decision' => $want,
  15. 'numero' => $nombremagique,
  16. 'publique' => $publique,
  17. 'ip' => $ip
  18. ));
  19.  
  20. conn.execute("SELECT * FROM ... WHERE firstname=%s AND lastname=%s", (val1,val2))
  21.  
  22. data = {'firstname': 'Bob', 'lastname': 'Smith'}
  23. conn.execute("SELECT * FROM ... WHERE firstname=%(firstname)s AND lastname=%(lastname)s", data)
Add Comment
Please, Sign In to add comment