| | |
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2009
Posts: 1
Reputation:
Solved Threads: 0
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
0
#1 Nov 11th, 2009
I keep getting this message
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/j/a/c/jackattacksite/html/register.php on line 80
Here's the code:
I checked if the variables matched, but they seemed to match. Thanks to anyone who helps
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/j/a/c/jackattacksite/html/register.php on line 80
Here's the code:
php Syntax (Toggle Plain Text)
// Connect to database include_once "scripts/connect_to_mysql.php"; $emailCHecker = mysql_real_escape_string($email1); $usernameChecker = mysql_real_escape_string($username); $emailCHecker = eregi_replace("`", "", $emailCHecker); $usernameChecker = eregi_replace("`", " ", $usernameChecker); // Database duplicate e-mail check setup for use below in the error handling if else conditionals $sql_email_check = mysql_query("SELECT email FROM myMembers WHERE email='$emailCHecker'"); $email_check = mysql_num_rows($sql_email_check); $sql_username_check = mysql_query("SELECT username FROM myMemebers WHERE username='$usernameChecker'"); $username_check = mysql_num_rows($sql_username_check);
I checked if the variables matched, but they seemed to match. Thanks to anyone who helps
•
•
Join Date: May 2008
Posts: 113
Reputation:
Solved Threads: 4
-1
#2 Nov 11th, 2009
i believe this generally means that the search of the database is not returning any result... or something along those lines...
you could try adding a catch after the mysql_query's
something like
$sql_email_check = mysql_query("SELECT email FROM myMembers WHERE email='$emailCHecker'") OR die('Error in mysql syntax: ' . mysql_error());
but gl getting this fixed
you could try adding a catch after the mysql_query's
something like
$sql_email_check = mysql_query("SELECT email FROM myMembers WHERE email='$emailCHecker'") OR die('Error in mysql syntax: ' . mysql_error());
but gl getting this fixed
Do you geek alone?
<<TimmCo>> Custom Computers
~Executive
<<TimmCo>> Custom Computers
~Executive
•
•
Join Date: Sep 2009
Posts: 557
Reputation:
Solved Threads: 64
0
#3 Nov 11th, 2009
•
•
•
•
I keep getting this message
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/j/a/c/jackattacksite/html/register.php on line 80
Here's the code:
php Syntax (Toggle Plain Text)
// Connect to database include_once "scripts/connect_to_mysql.php"; $emailCHecker = mysql_real_escape_string($email1); $usernameChecker = mysql_real_escape_string($username); $emailCHecker = eregi_replace("`", "", $emailCHecker); $usernameChecker = eregi_replace("`", " ", $usernameChecker); // Database duplicate e-mail check setup for use below in the error handling if else conditionals $sql_email_check = mysql_query("SELECT email FROM myMembers WHERE email='$emailCHecker'"); $email_check = mysql_num_rows($sql_email_check); $sql_username_check = mysql_query("SELECT username FROM myMemebers WHERE username='$usernameChecker'"); $username_check = mysql_num_rows($sql_username_check);
I checked if the variables matched, but they seemed to match. Thanks to anyone who helps
PHP Syntax (Toggle Plain Text)
$emailCHecker = eregi_replace("`", "", $emailCHecker);
PHP Syntax (Toggle Plain Text)
$email_check = 0; if(mysql_num_rows($sql_email_check) !='' || mysql_num_rows($sql_email_check) !=FALSE) { $email_check = mysql_num_rows($sql_email_check); }
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
0
#4 Nov 11th, 2009
Don't use ereg (http://php.net/preg), and read the giant READ ME FAQ at the top of the PHP forums then come back here and ask your question again
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
![]() |
Similar Threads
- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource (PHP)
- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in (PHP)
- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource (PHP)
Other Threads in the PHP Forum
- Previous Thread: select one checkbox instedof select multiple checkboxes
- Next Thread: Global Class Variables.
Views: 373 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class clean cms code countingeverycharactersfromastring cron curl database date directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail match menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions simple sms soap source space spam speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube






