can u have automatic datdabase update? Help.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dhrups
Forum Newbie
Posts: 1
Joined: Mon Aug 28, 2006 8:17 am

can u have automatic datdabase update? Help.

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I'm not sure what level of automagic you're looking for. Can you please elucidate.
blackbeard
Forum Contributor
Posts: 123
Joined: Thu Aug 03, 2006 6:20 pm

Post 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
Post Reply