Afficher un message
Vieux 04/10/2007, 11h18   #1
zoot
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut something like a trigger!

Hello,

I am running a Mysql 5.0.20a.
The database I am building now will contains information about musique
records hold on various support, CD, vinyl tapes...
I would that when somebody insert a new records in the table
'records', that a 'trigger' does a 'lookup' into another table
( media ) to verify that the support already exist, and that the
syntax used is valid.
the table records hold infromation on the musiques (authors,
executant, orchestre...) while media hold informations on support type
(CD, 33tour, 45 Tour (vinyl).. ) the table srecors hold a pointer to
the media table.
I have tried the trigger available in Mysql, but seems that It can
only use column existing in the table where the trigger has been
decalred and as no way to access any other table.
It can't even call a stored procedure nor a function.
Does somebody have an idea how to simulate this?
I am currently implementing this at the PHP level, but shouldn't that
be at the database level?
Kind regards
Zoot

  Réponse avec citation
 
Page generated in 0,05592 seconds with 9 queries