Poll
Has Hilco abandoned this site?
Yes?
50%
No?
17%
I can't tell!
33%
Total votes: 6
- Login to post comments
- Older polls
User login
Recent comments
- php to update prices
1 year 4 weeks ago - I suggest you create a php
1 year 4 weeks ago - If you don't know much about
1 year 10 weeks ago - Hi Hilco
1 year 11 weeks ago - Hi Kha,
1 year 11 weeks ago - this should
1 year 16 weeks ago - Hi!
Well, there's not much
1 year 18 weeks ago - Have a look at the $_POST
1 year 19 weeks ago - Thanks Tony
1 year 19 weeks ago - 1) No, never use the same ID
1 year 20 weeks ago
New forum topics
Active forum topics
Who's new
Query help
- Login to post comments
Fri, 06/26/2009 - 12:47
I have recently taken over the running of an e-commerce website. Once in a while i will need to increase the prices of certain products by a certain percenatge. The products all have a code starting with the letters and then digits. for instance: ffc1234, ffc1245, dcc4544, dcc5799, vff300, and so on. I may only have to update the dcc prices one month, and the ffc the next. I need to know the UPDATE query to be able to do this.
The product codes are in a column called p_code and the prices that need to be updated are in a column called p_prices.
I need to run an UPDATE query in PHPMYADMIN. ... can anyone help?
Kevin

I suggest you create a php script for doing so, just select all products you want to update first, then run a query for each product to update it using php. It's a bit saver than an update query, because when you fail one, your database is messed up and that's not undoable.
Select all products you want to change price for
use php to calculate new price
run a query to update productprice using php
Thanks Hilco,
That's ok if I knew PHP, which I dont, so where do I start to look for the code is there a video. I have watched the core training already so I know that much but dont know where to start with creating the script.
Kevin