On way to do it would be to create a table called flags and update the value in that

psuedo code

update flags set locked =1
get value to calculate

otheruesrs would check the page
select locked from flags
if NOT locked then do query


on the update page update table set calculation = result update flags set locked = null

hope it makes sense

pete


Tony Crockford wrote:
Hi

bit confused!

here's what I want to do:

get a numeric value from a MySQL table, do a calculation, then on another PHPpage update the numeric value in the table.

what I don't want is anyone else getting the same number from the table before I've updated it.

what PHP would you use to do this?

Sorry for what is probably a really basic question - I did look at the MySQL manual, but I'm not sure how exactly to issue an SQL query LOCK TABLES using PHP.

TIA

Tony

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to