Update Query


#1

Im selling tickets and I need to be able to reduce the total number of tickets when one is sold. I have a table with the total number of tickets stored in a field and and a field with the quantity sold in a particular purchase. I think this is a fairly simple update query can anybody help get me started?


#2

Would something like this work:

[php]
$sql = “UPDATE myTable SET tickets = tickets - 1 WHERE myConditions”;
[/php]