Created
July 15, 2011 21:14
-
-
Save gaurish/1085562 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//mysql extension way | |
$id = 10; | |
$rs = mysql_query("SELECT name from users where id=$id"); | |
//PDO way | |
$stmt = $dbh->prepare("SELECT * FROM REGISTRY where name LIKE '%?%'"); | |
$stmt->execute($id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment