Mysql Question!
Posted: Wed Apr 20, 2005 12:33 pm
Quick Question,
I need to select, add and update a mysql table all in one query. Does anybody have any suggestions?
For example. I need to know the number of a field in a table, once i get the number i need to increament/decreament it by a given number, then i need to update that field.
I need to do it all in one shot cause i have a script that increaments it at least 5 times a second. Now, i know i can do seperate calls but not sure if i would be getting the right amount that percise second.
Not sure if i'm making sence, but can anybody help? I've checked mysql.com and couldn't find anything that could help me.... or i just didn't know what to look for.
thanks
I need to select, add and update a mysql table all in one query. Does anybody have any suggestions?
For example. I need to know the number of a field in a table, once i get the number i need to increament/decreament it by a given number, then i need to update that field.
I need to do it all in one shot cause i have a script that increaments it at least 5 times a second. Now, i know i can do seperate calls but not sure if i would be getting the right amount that percise second.
Not sure if i'm making sence, but can anybody help? I've checked mysql.com and couldn't find anything that could help me.... or i just didn't know what to look for.
thanks