$sql = "CREATE TRIGGER updt_type BEFORE UPDATE ON ec_user.login.type
BEGIN
INSERT INTO ec_user.user.type
SET ec_user.user.type = NEW.ec_user.login.type,
tec_id = OLD.tec_id;
END;
";
$sth = $dbh->prepare($sql);
$sth ->execute() or die "Connection Error: $DBI::errstr\n";
$sth->finish();
$dbh->disconnect();
I didn't include the MySQL-pp connection $dbh - I will, but I don't think its relevant.......
When I run this is what I the error I get: (with strict enabled)
DBD::mysqlPP::st execute failed: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.type
BEGIN
INSERT INTO ec_user.user.type
SET ec_user.user.type = '',
' at line 1 at tables/user.pm line 106.
Connection Error: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.type
BEGIN
INSERT INTO ec_user.user.type
SET ec_user.user.type = '',
' at line 1
Compilation failed in require at C:\inetpub\wwwroot\TEC\++ Database ++\db\db.pl line 250.
Thanks for the help in advanced! In reply to MySQL-pp, Perl and MySQL Triggers by skosterow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |