Hi David,
I was trying to edit the admin.php file so that I can limit the number of products deleted while importing datafeeds to prevent my server from slowing down while this process is taking place, however when I looked at this file it has so many SQL statements with the keyword DELETE and I am not sure which SQL statement I should edit and add LIMIT to
Hi David,
Is this SQL statement in the admin_import() function ? because my codes have so many line spaces
Hi Robert,
Sorry - yes there is a line space (the forum removes the double-spacing), so it looks like:
$sql = "DELETE FROM `".$config_databaseTablePrefix."products` WHERE merchant='".database_safe($admin_importFeed["merchant"])."'";
database_queryModify($sql,$insertId);
(starting at line 416 in the distribution)
If you're still not sure - drop me an email with your existing includes/admin.php and i'll patch it for you...
Cheers,
David.
Hi,
I've posted code to do exactly this a while ago - you can set a block size for each DELETE and sleep() in between reducing the server load considerably...
http://www.pricetapestry.com/node/1235
Cheers,
David.