[KLUG Members] triggering a program

Jamie McCarthy jamie at mccarthy.vg
Thu Feb 16 11:15:29 EST 2006


bill at billtron.com (bill) writes:

> The DB is MySQL 4.11.14.  I don't see stored procedures,
> functions, and triggers available until 5.x

Even in MySQL 5.0, triggers can't make system calls, they can only
affect the database.

> So, if I can't use a db trigger, are there other ideas?

You say this needs to happen in "real time."  Do you mean within
seconds?  Milliseconds?

Since Box 3 is apparently running a webserver I'm guessing this
doesn't need to happen within milliseconds.  So Box 3 could poll the
database periodically to see whether new information is available.
If your INSERT adds a row to a table with an AUTO_INCREMENT primary
key, for example, you could just do a SELECT MAX(id) once a second
and see if it changes.

That solution's also compatible with any SQL database, so if Box 2
that you don't have full access to gets changed around, it would
probably still work.
-- 
  Jamie McCarthy
 http://mccarthy.vg/
  jamie at mccarthy.vg



More information about the Members mailing list