Error : Unknown database failure

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Guest
i just installed authlib program. i then tested it by registering, and got this as a result:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dekarab/public_html/balikbayanbox/postcards/backend.php on line 98

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dekarab/public_html/balikbayanbox/postcards/backend.php on line 109

Error : Unknown database failure, please try later.


*****from my html:

98: $result = mysql_num_rows($query);
109: $result = mysql_num_rows($query);

*apparently, the script works for php 4.1, but my webserver is currently running php 4.2.1.

is there a way to tweak the script to make it run under php 4.2.1?
 
ibalik said:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dekarab/public_html/balikbayanbox/postcards/backend.php on line 98

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dekarab/public_html/balikbayanbox/postcards/backend.php on line 109

Error : Unknown database failure, please try later.

*apparently, the script works for php 4.1, but my webserver is currently running php 4.2.1.

is there a way to tweak the script to make it run under php 4.2.1?

check what mysql want?

I have this Error just when I made mistake in names of data base or tables...

for exemple I have data base which has name equipment and whan i want connect by this code i got error

$link=mysql_connect("localhost", "pejone", "mypassword");
mysql_select_db("quipment", $link); // here is error

try to check all names of your daba bases, tables, users, passwords, hosts, may be you like me make some where mistake...
 
Can you post the code previous to where the error occurs? It seems the error is elsewhere but is only showing up when you use the mysql_num_rows() function. It's possible that your query code is wrong. I suspect this because PHP 4.2.0 upwards doesn't register all the Global variables by default, it's more secure. If your script doesn't use the Super Globals array for any variables passed to the query, your query won't be formed properly which will mean that there will be no result returned from your mysql query. Hence the error.
 
Back
Top