• Welcome to AcornDomains.co.uk, a friendly community for UK domain investors, developers and anyone interested in domain names.

    Whether you're looking to buy or sell domains, learn more about the UK domain market, get feedback on your names, or simply chat with other domainers, you're in the right place. AcornDomains has been bringing together people from across the UK domain industry for many years, from complete beginners to experienced investors.

    Have a look around, join the discussions and, if you haven't already, create a free account and introduce yourself.

mysql help

Status
Not open for further replies.
Joined
Mar 13, 2006
Posts
2,265
Reaction score
31
I've got a mysql database running a shop with oscommerce.

Can any explain how to replace a value in a field (postage weight) for every product.

It looks like when I last added a datafeed I forgot to put and wieght so its stuck with the default of 0.00 which doesn't get charged any postage.

any help appreciated
 
UPDATE tablename
SET fieldname = new value
[, field2 = new value]
[WHERE any fieldname = filter value]

The where is optional, but if you don't specify will update the whole table.

If you're not sure, take a backup first :)
 
Your host probs has phpmyadmin installed. Which is a simple gui to manage mysql. If not you can d/l it free and install it. Will allow you to do the above in a simple click and do enviroment.
 
UPDATE tablename
SET fieldname = new value
[, field2 = new value]
[WHERE any fieldname = filter value]

Personally if your not sure first create SELECT statement so you can see what will be changed. Then do as monaghan said and UPDATE

Just dont forget its a one way process, once updated you cant undo (unless you have a backup)
 
Status
Not open for further replies.
Top Bottom