-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all,
I've a problem with triggers and federated table: I would like insert a record in a unknown table. The table where insert the record is unknown when the trigger starts. But, with a field value, I select the table name. CREATE TRIGGER insert_users AFTER INSERT ON users FOR EACH ROW BEGIN DECLARE tablename CHAR(50); SELECT SERVER_usertable INTO @tablename FROM servers WHERE SERVER_id = NEW.SERVER_id ; INSERT INTO @tablename VALUES (NEW.USER_id, NEW.USER_email, NEW.USER_password, NEW.USER_nickname, NEW.USER_max_space, 0) END; But, it doesn't work... Does somebody have an idea ? Thanks, Jean-Yves. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEx9U6ckDu29zkZ3kRAmucAKC/iiJeidWM2UHDPWVu5DL4in4VvACeN42N 9YMHop0YHtA9ul0ns0qGNk8= =IOV8 -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]