| | |
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
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 34 Days Ago
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 34 Days Ago
•
•
•
•
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 34 Days Ago
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.
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date development directory display download dynamic echo email error file files filter folder form forms function functions gc_maxlifetime google host href htaccess html image include insert integration ip java javascript joomla limit link login loop mail memmory memory menu mlm mod_rewrite multiple mysql navigation oop parse parsing paypal pdf php problem query radio random recursion regex remote script search server sessions sms snippet soap source space sql structure syntax system table thesishelp tutorial update upload url validation validator variable video web xml youtube






