stitch626
Новичок
не работает триггер
mysql5.020
Ответ MySQL: Документация
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int' at line 3
в чем все таки проблема? по мануалу должно работать начиная с версии 5.0.10.
mysql5.020
PHP:
CREATE TABLE `t1` (
`id` int(11) default NULL
);
CREATE TABLE `t2` (
`id` int(11) default NULL
);
CREATE TABLE `t3` (
`id` int(11) default NULL,
`id2` int(11) NOT NULL
);
PHP:
create trigger tr_t1 before insert on t1 for each row
begin
declare t3_id int;
select t3.id2 into t3_id from t3 where t3.id = new.id;
end;
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int' at line 3
в чем все таки проблема? по мануалу должно работать начиная с версии 5.0.10.