MySQL Forums
Forum List  »  Triggers

trigger
Posted by: charith ekanayake
Date: January 24, 2012 08:20AM

I'm having trouble with the following mysql trigger can someone help me

create trigger posting
before delete on temp
for each row
begin

insert into Product
(username,start_date,pd_image,pd_details)

values(old.username,now(),old.pd_image,old.pd_details)
end;

create table Product
(
pid bigint unsigned not null auto_increment
username varchar(10),
start_date datetime,
pd_image BLOB,
pd_details TEXT,
current_bid float(10,2) default 0.00,

primary key(pid),
foreign key(username) references User(username)
);

create table temp
(

username varchar(10),

pd_image BLOB,
pd_details TEXT,


);

Options: ReplyQuote


Subject
Views
Written By
Posted
trigger
2205
January 24, 2012 08:20AM
1130
January 24, 2012 03:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.