Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PHP mysql_query, integer returned instead of resource
- function sqlResult($query)
- {
- return mysql_query($query)
- or die("SQL Query: " . $query . "<br />SQL Error: " . mysql_error());
- }
- PHP Warning: mysql_fetch_array() expects parameter 1 to be resource,
- boolean given in /var/www/login/login_submit.php on line 42
- $sqlQuery =
- "SELECT userID, username, password, access_level
- FROM users
- WHERE username = '{$username}'
- AND (password = '{$password_sha1}' OR password = '{$password_sha256}')";
- return (mysql_query(...)) or die(...);
- function sqlQuery(...) {
- $result = mysql_query(...);
- if ($result === FALSE) {
- die(mysql_error(...));
- }
- return $result;
- }
Add Comment
Please, Sign In to add comment