Re: Problem with creating a stored procedure
Changed that now I get a new error, I have never done MySQL stored procedures before and I have no clue what is wrong with this, I tried changing a few things like adding single ticks to the values, that changes the error to line 28 I tried adding end to the end of the query, I tried it with and without the semi-colon. Im just completly lost.
Error
SQL query:
CREATE PROCEDURE `sp_addChild` (
IN CID int,
IN fname varchar( 50 ) ,
IN lname varchar( 50 ) ,
IN DOB DATETIME,
IN gender varchar( 10 ) ,
IN goals varchar( 255 ) ,
IN nameMeaning varchar( 255 ) ,
IN orphaned tinyint,
IN family varchar( 255 ) ,
IN eligible tinyint,
IN notes varchar( 255 )
) BEGIN INSERT INTO Children(
Child_ID,
Child_Fname,
Child_lname,
Child_DOB,
Child_gender,
Child_goals,
Child_nameMeaning,
Child_orphaned,
Child_family,
Child_eligible,
Child_notes
)
VALUES (
CID, fname, lname, DOB, gender, goals, nameMeaning, orphaned, family, eligible, notes
);
MySQL said: Documentation
#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 '' at line 31