Created
June 18, 2015 13:39
-
-
Save LayneSmith/a08f12ba953d94db7b3b to your computer and use it in GitHub Desktop.
Check SQL in PHP
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
| $sql = "SELECT COUNT(*) FROM " . $thisTable . " WHERE ip = '$ip'"; | |
| echo $sql; | |
| $res = $db->query($sql); | |
| if (! $res) { | |
| print_r($db->errorInfo()); | |
| } | |
| $duplicateIP = $res->fetchColumn(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment