You are here:  » mysql_fetch_array() and mysql_num_rows()

Support Forum



mysql_fetch_array() and mysql_num_rows()

Submitted by nosferatu on Sat, 2008-08-16 08:10 in

Hi,
I have this 2 errors. Can you help me pls, :(

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in public_html/includes/database.php on line 21

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in public_html/includes/database.php on line 26

Submitted by support on Sat, 2008-08-16 08:47

Hi,

Firstly, please confirm that you have run setup.php on this installation, as this will cause database errors to be displayed as the database would not yet have been created.

Assuming that's OK; can you let me know exactly when this error occurs - what links you have clicked for example, and if you like you could email me a URL so that I can have a look for you.

It may also help in debugging (if you have been making modifications that may have caused this error) to use the debug version of database.php which you can download here. If you unzip the file, and then upload database.php to your /includes/ directory; the actual SQL statement that caused the error will then be displayed which should indicate the source of the problem...

Cheers,
David.

Submitted by nosferatu on Sat, 2008-08-16 11:39

this is the error now:

[SELECT * , MIN( price ) AS minPrice, MAX( price ) AS maxPrice, COUNT( id ) AS numMerchants, MATCH name AGAINST ('Centrala Incendiu GE 6 zone NKB606') AS relevance FROM `products` WHERE category = 'Securitate Centrale Incendiu' AND MATCH name AGAINST ('Centrala Incendiu GE 6 zone NKB606') AND name <> 'Centrala Incendiu GE 6 zone NKB606' GROUP BY name ORDER BY relevance LIMIT 3][Can't find FULLTEXT index matching the column list]

Submitted by support on Sat, 2008-08-16 11:49

Hi,

Thanks for that - it does show what the problem is. For some reason, the FULL TEXT index against the product name field has gone missing.

Could you perhaps email me a link to the site and i'll take a look...email address on this page...

Cheers,
David.