Hiya,
I'm basically trying to keep a cached value of the result of a COUNT(*)
command in a different table. My basic problem is that I don't know the
syntax of what I want to do - I basically need a correct version of the
following command:
UPDATE sales, customer SET customer.orders = COUNT(*) FROM sales WHERE
sales.cid = customer.id;
If anyone could help, or point me in the direction of the correct resource
then I'll be very grateful.
R.
I'm basically trying to keep a cached value of the result of a COUNT(*)
command in a different table. My basic problem is that I don't know the
syntax of what I want to do - I basically need a correct version of the
following command:
UPDATE sales, customer SET customer.orders = COUNT(*) FROM sales WHERE
sales.cid = customer.id;
If anyone could help, or point me in the direction of the correct resource
then I'll be very grateful.
R.