0

Hi guys, i'm new here.

First of all, i'm from Argentina... So maybe my english is a little crappy

I'm developing a page with login. I uploaded it to a hosting with no poblem... But when i want to create a stored procedure an error appearse. I've searched on web (almost everytime i finished here) for days... But no answers. So i open phpMyAdmin, created the database, selected it and go to the "SQL" tab. Here is the code i wrote

CREATE PROCEDURE LoginCorrecto (in pUsuario VARCHAR(30), out pPassword VARCHAR(50))
BEGIN
  SELECT usuario
  FROM usuarios
  WHERE (usuario = pUsuario) and (contrasenia = pPassword);
END

And this is the error:

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 5

I started a few weeks ago with Mysql so maybe a trivial error, maybe that ";" doesn't go there... I don't know. Im the command line works fine

Hope you can help me

Thanks :)

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by smantscheff
0

You might consider changing the parameter "pPassword" to IN (it's set as "OUT" right now).

0

Probably your forgot to change the delimiter before and after your procedure definition:

DELIMITER //
CREATE PROCEDURE LoginCorrecto ...
  ...
END //
DELIMITER ;
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.