You are here:  » IMPORT UPDATE

Support Forum



IMPORT UPDATE

Submitted by morish10 on Thu, 2008-09-25 17:30 in

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

Price comparison

Submitted by support on Thu, 2008-09-25 17:32

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.

Submitted by morish10 on Thu, 2008-09-25 17:47

Hi David,

Is this SQL statement in the admin_import() function ? because my codes have so many line spaces

Price Comparison

Submitted by support on Thu, 2008-09-25 17:53

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.

Submitted by morish10 on Thu, 2008-09-25 18:46

Hi David,

Thanks,

Robert

Price Comparison