Skemcin Posted November 19, 2007 Share Posted November 19, 2007 Hi all,I'm used to doing this in MS SQL so I' am not 100% comfortable with mySQL syntax. Can some one tell me what is wrong with this? I am trying to pass in two values "uname" and "pword" for a simple log in script. This is MYSQL 5.0: DELIMITER $$DROP PROCEDURE IF EXISTS my_database.qryCheckUser $$CREATE PROCEDURE my_database.qryCheckUser(in_my_uname varchar(25),in_my_pword varchar(25))BEGINDECLARE in_my_uname varchar(25);DECLARE in_my_pword varchar(25); SELECT * FROM my_tablename WHERE my_uname = in_my_uname AND my_pword = in_my_pwordEND $$DELIMITER; Its telling me:"Script line: 4 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 [mysql statement] line 12"Thanks in advance.P.S. I've been all over the documentation here:http://dev.mysql.com/doc/refman/5.0/en/sto...procedures.htmlto no avail. Link to comment Share on other sites More sharing options...
justsomeguy Posted November 19, 2007 Share Posted November 19, 2007 I can't find specific rules on this, but try removing the variable declarations. I'm not sure you declare parameters. Link to comment Share on other sites More sharing options...
Skemcin Posted November 20, 2007 Author Share Posted November 20, 2007 wow - I had tried so many combinations of things and I could have sworn that was one of them. Apparently not, because I just loaded the script I saved when I posted this and removed the declaration statements as you suggested. It works.Thanks a ton. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.