PHP in Mysql Integration

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
magna
Forum Newbie
Posts: 1
Joined: Sun May 11, 2003 9:07 pm

PHP in Mysql Integration

Post by magna »

Hey, i have heard that i could get PHP in a MySql database that will execute everytime you retrieve the table infomation, is this true?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You can use eval() to execute PHP code stored within a database but I'd avoid that if at all possible and have the PHP code within normal files.

Mac
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

sounds like you're asking for triggers
http://www.mysql.com/doc/en/ANSI_diff_Triggers.html
Triggers will also be implemented. A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you can install a stored procedure that is triggered each time a record is deleted from a transaction table and that stored procedure automatically deletes the corresponding customer from a customer table when all his transactions are deleted.
strange, the german translation states that stored procedures will be implemented but without triggers :?
Post Reply