skosterow has asked for the wisdom of the Perl Monks concerning the following question:
$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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MySQL-pp, Perl and MySQL Triggers
by Mr. Muskrat (Canon) on Dec 18, 2015 at 21:16 UTC | |
|
Re: MySQL-pp, Perl and MySQL Triggers
by GotToBTru (Prior) on Dec 18, 2015 at 21:00 UTC | |
by skosterow (Novice) on Dec 18, 2015 at 21:05 UTC | |
|
Re: MySQL-pp, Perl and MySQL Triggers
by poj (Abbot) on Dec 18, 2015 at 20:32 UTC | |
by skosterow (Novice) on Dec 18, 2015 at 21:04 UTC | |
by Anonymous Monk on Dec 19, 2015 at 18:29 UTC |