here some sampe sql statements and the sequence for it.
mysql> LOCK TABLES trans READ, customer WRITE;
mysql> select sum(value) from trans where customer_id= some_id;
mysql> update customer set total_value=sum_from_previous_statement
where customer_id=some_id;
mysql> UNLOCK TABLES;
Now all you have to do is submit each as query statements using the mysql_query("..") and it should work.
Daron
He is coming Again