How do I add one to the value of a cell? For example I have a column called count, and I want to get the current value of count and add one to it. I know I can assign the value of count to a var and increment the var by one and rewrite the var to the table but this seems redundant. Is there not a more elegant way than this?
Thanks for your help.
Marcel.
If you're using MySQL, I don't know of any way to do a select and an update in the same command. You'll have to use two.
SELECT count FROM your_tables;
UPDATE your_table SET count=count+1;
---John Holmes...
OK...in cold fusion you can and I thought you also could in mysql as it follows the same syntax, most of the time.
Thanks for your help, Marcel.
I did it with two in cold fusion too. Sorry about that. 🙂