Hello,
If i want to import a datafeed, i get:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/htdocs/hegbtnfd/wohh-shop/includes/database.php on line 21
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/hegbtnfd/wohh-shop/includes/database.php on line 26
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/hegbtnfd/wohh-shop/includes/database.php:21) in /www/htdocs/hegbtnfd/wohh-shop/admin/feeds_import.php on line 29
What's going on?
Sorry for the hard delay, I was ill for a long time. I did what you said:
[SELECT COUNT(*) AS productCount FROM `products` WHERE merchant='Guna'][Table 'products' is marked as crashed and should be repaired]
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/htdocs/hegbtnfd/wohh-shop/includes/database.php on line 26
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/hegbtnfd/wohh-shop/includes/database.php on line 31
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/hegbtnfd/wohh-shop/includes/database.php:21) in /www/htdocs/hegbtnfd/wohh-shop/admin/feeds_import.php on line 29
Hello Schahab,
That indicates that your MySQL database has become corrupted.
This can happen sometimes if, for example, the hard disk holding the database has a problem.
Assuming that the PHP user has sufficient privileges, you should be able to repair the table with the following script:
repair.php
<?php
set_time_limit(0);
require("includes/common.php");
$sql = "REPAIR TABLE `".$config_databaseTablePrefix."products`"
database_queryModify($sql,$result);
print "Done.";
?>
Run this in your main Price Tapestry directory. It may take a few minutes to run.
Hope this helps,
Cheers,
David.
Hi there,
I see that this is a site that has been running OK for some time, so it possibly indicates a transient database error.
I have uploaded a debug version of database.php to the support folder. Could you please extract database.php from the link below, and upload this to your /includes/ folder, making sure to overwrite the existing version.
database.zip
When the error occurs again, details of the query that was being performed and the MySQL error message will be displayed - if you could post these it will help to establish where the problem lies...
Cheers,
David.