Skip to content

Instantly share code, notes, and snippets.

@Goddard
Created July 21, 2010 17:07
Show Gist options
  • Save Goddard/484772 to your computer and use it in GitHub Desktop.
Save Goddard/484772 to your computer and use it in GitHub Desktop.
$sql2 = "UPDATE users SET logintime=?, iplog = CONCAT(iplog, ?) WHERE id=? AND iplog NOT LIKE ?";
$query2 = $DB->prepare($sql2);
$query2->execute(array($date_time, $ip ."':'", $id, "'%'". $ip ."'%'"));
@Goddard
Copy link
Author

Goddard commented Jul 21, 2010

got it working

@Goddard
Copy link
Author

Goddard commented Jul 21, 2010

this is a good example of how to use a PDO object to prepare a SQL statement and execute it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment