Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 2nd, 2013  |  syntax: None  |  size: 0.33 KB  |  views: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. $con=mysqli_connect("example.com","peter","abc123","my_db");
  3. // Check connection
  4. if (mysqli_connect_errno())
  5. {
  6.  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  7. }
  8.  
  9.  mysqli_query($con,"DELETE FROM Persons WHERE LastName='Griffin'");
  10.  
  11. mysqli_close($con);
  12. ?>
  13.        
  14. UPDATE Persons
  15.     set LastName = ''
  16. WHERE
  17.     id = ?
clone this paste RAW Paste Data