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))
  SELECT usuario
  FROM usuarios
  WHERE (usuario = pUsuario) and (contrasenia = pPassword);

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 :)

Recommended Answers

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

Jump to Post

All 2 Replies

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

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

CREATE PROCEDURE LoginCorrecto ...
END //
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.