Page 1 of 1

can u have automatic datdabase update? Help.

Posted: Tue Aug 29, 2006 5:04 am
by dhrups
Hi,
I would like to know if it is possible to create an automatic update system.
I.E I have implemented a small stock control system using PHP and MySQL and currently i am updating the quantity field manually using an update function. I want to implement a sales invoice function where i can input a certain amount of quantity and it automatically adjusts the quantity levels in the database table.
Can somebody please advice me on this situation.

Thanks,

Dhrups

Posted: Tue Aug 29, 2006 5:25 am
by volka
I'm not sure what level of automagic you're looking for. Can you please elucidate.

Posted: Tue Aug 29, 2006 6:12 am
by blackbeard
I think you're talking about using triggers, which mysql 5 has.

http://dev.mysql.com/doc/refman/5.0/en/triggers.html