Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Dec 2nd, 2013  |  syntax: None  |  size: 0.33 KB  |  hits: 35  |  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 = ?