Help with mysql query..

death_relic0

Distinguished
Sep 18, 2009
111
0
18,640
2
hey guys, was hoping u could help me out...

ok i do know some sql, but im new to mysql... and theres this simple query that i just cant figure out whats wrong with it...

CREATE PROCEDURE inserttoscrapbookSD
(owner1 VARCHAR(50),
poster1 VARCHAR(50),
Scrap1 VARCHAR(50),
Date_time1 DECIMAL,
InsertedOrNot DECIMAL
)
BEGIN

INSERT INTO scrapbook (Owner)

VALUES(owner1)

END
i know there are a lot of variables being passed, but just using one variable atm because if it works for one, itll work for all.. i tried with and without a semicolon (;) at the end of "END" but no luck.. it says

#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 'END' at line 14

thanks in advance
 

mgwildi

Honorable
Apr 20, 2012
8
0
10,510
0
hmm, i'm not that much into mysql, but i'd go with a missing semicolon at the end of the insert statement " ... VALUES(owner1) ;" and after the procedure definition "... END ;"
 

death_relic0

Distinguished
Sep 18, 2009
111
0
18,640
2



no luck, this is what i tried:

CREATE PROCEDURE inserttoscrapbookSD
(owner1 VARCHAR(50),
poster1 VARCHAR(50),
Scrap1 VARCHAR(50),
Date_time1 DECIMAL,
InsertedOrNot DECIMAL
)
BEGIN

INSERT INTO scrapbook (Owner)

VALUES(owner1);

END ;
 

mgwildi

Honorable
Apr 20, 2012
8
0
10,510
0
hmmm okay...! could it be about the parameters directions?

I just rapidly checked for mysql procedure syntax, I think you have to specify it for PROCEDURE (which doesn't seem to be the case when creating a FUNCTION)
 
Thread starter Similar threads Forum Replies Date
L Apps General Discussion 1
S Apps General Discussion 2
A Apps General Discussion 1
C Apps General Discussion 2
ebmurray21 Apps General Discussion 2
I Apps General Discussion 11
P Apps General Discussion 5
A Apps General Discussion 1
M Apps General Discussion 1
Jordan 646 Apps General Discussion 8
R Apps General Discussion 2
AGx-07_162 Apps General Discussion 3
AGx-07_162 Apps General Discussion 9
muppetlol Apps General Discussion 8
chugot9218 Apps General Discussion 2
O Apps General Discussion 1
O Apps General Discussion 1
MEMOFLEX Apps General Discussion 1
devilhanzou Apps General Discussion 4
Pyroflea Apps General Discussion 1

Similar threads


ASK THE COMMUNITY