If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Categories, Products, Attributes / Updating product price by MySQL gives copy of product

Updating product price by MySQL gives copy of product

Started by veryveryinteresting on 27 Apr 2013, 2:14 PM · Views: 628

Results 1 to 3 of 3
27 Apr 2013, 2:14 PM
#1
veryveryinteresting avatar

veryveryinteresting

New Zenner

Join Date:
Apr 2013
Posts:
8
Plugin Contributions:
0

Updating product price by MySQL gives copy of product

Hi all,

I am using Zen Cart 1.5.1, I installed myself via SFTP upload and then configuration. My host uses PHPMyAdmin to access the database, which is how I am checking if my stuff is working.

I've looked through the forums and can't find anything relevant.

I am using a program (irobotsoft.com MySQL version) that scrapes data and uploads to my MySQL database by SSH tunnel.

It sort of works when I have it updating the prices on my products, except all I had it updating was the products_price and products_price_sorter fields. What is does is create a new product field with only the products_price field and products_price_sorter values filled, everything else NULL or blank.

So I thought, ok, I will just tell it to update the product I want, so I have it updating products_id with the id I want to update as well as the price fields, and nothing changes when I run it then.

Is the problem with the program I am using or with MySQL or zen cart? Is there a feature I can tick to allow it to "hot update" the products prices?

Thanks.

27 Apr 2013, 2:33 PM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Updating product price by MySQL gives copy of product

Sounds to me like that the program you are using is performing INSERTS rather than UPDATES.

Should be quite easy to fix/modify. The main problem (which won't be a problem with your usage) is that UPDATE commands can only work with existing records. If you try to UPDATE a non existent record mySQL outputs a server error message.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

27 Apr 2013, 3:53 PM
#3
veryveryinteresting avatar

veryveryinteresting

New Zenner

Join Date:
Apr 2013
Posts:
8
Plugin Contributions:
0

Re: Updating product price by MySQL gives copy of product

Thanks Rod! I think you are right, I will look into it!