Re: [PHP-DB] Need help in triggers

2009-10-05 Thread Samuel ROZE
What are you really want to do ? This is an exemple: CREATE FUNCTION myfunction () RETURNS trigger AS $$ BEGIN NEW.update_date = 'now'::date; RETURN NEW; END; $$ LANGUAGE plpgsql; CREATE TRIGGER set_update_date AFTER INSERT ON matable FOR EACH ROW EXECUTE PROCEDURE myfunction();

Re: [PHP-DB] Need help in triggers

2009-10-05 Thread gunawan
Yogendra Kaushik wrote: Hi all's i am working on an application in which we are using PostgreSql as an database, i need to write trigger for my application. Can any one help me how can i write it. i have try to write it, but did not get success. do you using PEAR? to help database?

Re: [PHP-DB] Need help in triggers

2009-10-05 Thread Pavan Keshavamurthy
Read the manual: http://www.postgresql.org/docs/8.1/interactive/sql-createtrigger.html Best _Pavan On Monday 05 October 2009 14:36:47 Yogendra Kaushik wrote: > Hi all's >i am working on an application in which we are using PostgreSql as an > database, i need to write trigger for my applicati

[PHP-DB] Need help in triggers

2009-10-05 Thread Yogendra Kaushik
Hi all's i am working on an application in which we are using PostgreSql as an database, i need to write trigger for my application. Can any one help me how can i write it. i have try to write it, but did not get success. -- Regard's Yogendra kaushik