Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Error : Unknown database failure

Codes here !

Moderators: macek, egami, gesf

Re: Error : Unknown database failure

Postby Oleg Butuzov » Mon Jul 22, 2002 3:51 am

ibalik wrote:
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...
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Jay » Thu Aug 01, 2002 2:26 pm

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.
Jay
 


Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.