I don't think you can tell mysql to run any commands whena records is inserted.
But what I do to achievge asimilar effect is this:
In the table I have a INT(1) field, say, Proc.
INSERT INTO .... Proc=1 ...
Then I cron a script to do this every hour or whatever:
SELECT ... WHERE Proc=1..
Foreach record returned:
do what you want and if successful:
UPDATE ... SET Proc=2
This way you can have many levels of processing and always be able to tell what's been
done and what needs done.
I also incorporate DATETIME fields for further control of doing things based
on INSERTS/UPDATES/ETC
HTH
DMuey
> I am working on a project where machines will use a perl
> script to write to a table in a MySQL database. I want a
> perl script to run everytime there is a new entry, but I
> don't know how to trigger the perl script when there is a new
> entry (the perl to be triggered will be sitting on the same
> box as the database). I know how to do basic database stuff
> with DBI, but I am still a perl beginner.
>
> Thanks,
> Nick
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]