I have the e-mail letter being sent out, them clicking the link, the script goes ahead and checks it against the database and if it matches, it is supposed to do 4 things: 1. Along the way I've told the script to report errors and it still reports no problems with the SQL Update.Change the confirmcode field from the confirm code to 'y' 2. Additionally, when I use the My SQL Query Browser tool, and run the same query, both fields get updated, but when I run it through PHP only the first field does. I've also tried UPDATE %TBLNAME% SET X=x AND SET Y=y WHERE Z=z and the same result happens, only the first value (confirmcode) gets set to y but accountstatus wont get set to brown.
update multiple columns using mysql UPDATE My SQL Development forum to discuss administration, SQL syntax, and other My SQL-related topics.
Find help with installing, configuring, and maintaining your My SQL databases.
ok, I've tried just updating 1 column (title, date, body) and they all work fine that way so why doesn't it work when Itry to update 3 at once ???
I've changed urlencode to htmlentities but that hasn't helped, any ideas ?
Use SET and then give a comma-delimited name=value listing of updates.
Also, putting stuff into the database, you probably want to add slashes rather than stripping them.
You strip slashes when pulling the data back out for display.
I've been working on a script for a few days 50% of it works in terms of installing the data from one table to another.
My SQL UPDATE with WHERE My SQL UPDATE command can be used with WHERE clause to filter (against certain conditions) which rows will be updated.
The following My SQL statement will update the 'receive_qty' column of newpurchase table with a new value 25 if the value of purch_price is more than 50.
Hi, I'm trying to update multiple columns in my db but I keep getting errors with the SQL.