Do you have a question? Post it now! No Registration Necessary. Now with pictures!
September 29, 2005, 7:47 am
rate this thread
Re: trigger question.
I haven't tried this, but I would recommend experimenting with
"SELECT ... INTO OUTFILE".
Tip: you can use SELECT without querying a table. E.g., the following
SELECT "literal string" INTO OUTFILE
The question is whether it works inside a trigger in MySQL 5.0.x. The
only definitive answer is to try it and see.
Note that this feature works only if the specified output file cannot
previously exist. This prevents SQL queries from clobbering critical
system files, such as /etc/passwd or database tables. This might make
it awkward for your triggers to write incremental updats.
Alternatively, you could try using the MySQL query log or binary log to
record changes automatically, and then write some other application to
filter the log. See http://dev.mysql.com/doc/mysql/en/binary-log.html
logging issues related specifically to triggers.
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum