You are here:  » Mysql error - mysql_fetch_array() expects parameter 1 to be resource

Support Forum



Mysql error - mysql_fetch_array() expects parameter 1 to be resource

Submitted by magnaromagna on Sat, 2010-05-15 22:50 in

Hello,
seems all search not shown any product and give this error:

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/../includes/database.php on line 45

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/../includes/database.php on line 50

How can I fix it? Thank you!

Submitted by support on Mon, 2010-05-17 09:54

Hi,

This sounds like the database connection has failed, indicating that one or more of $config_databaseServer, $config_databaseUsername, $config_databasePassword or $config_databaseName in config.php is incorrect.

You can test this by browsing to setup.php on your installation, which will indicate the progress of a database connection test, and let you know which values to check first. If Database Connection fails, check the server, username and password values, if Database Selection fails, check the database name...

Cheers,
David.

Submitted by magnaromagna on Tue, 2010-05-18 07:35

Thanks,
I solved by performing a mysql repair