vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I have a problem with a stored procedure: It goes as follows: DELIMITER $$ CREATE PROCEDURE `spValidateUser2`(IN _ClassID INT, IN _Username TEXT, IN _Password TEXT) BEGIN DECLARE v_password TEXT; SET v_password = _Username + _Password; SELECT UserID FROM users WHERE ClassID = _ClassID AND username = _Username AND Password2 = MD5(v_password); END $$ DELIMITER ; However, when I execute it with a parameter, that should return a UserID, it never returns anything. If I modify the Select-statement and just execute it as normal SQL with the same parameters, it works fine. Any ideas? |
| ||||
| René Vutborg wrote: > Hi, > > I have a problem with a stored procedure: > It goes as follows: > > DELIMITER $$ > > CREATE PROCEDURE `spValidateUser2`(IN _ClassID INT, IN _Username > TEXT, IN _Password TEXT) > BEGIN > > DECLARE v_password TEXT; > > SET v_password = _Username + _Password; > > SELECT UserID FROM users WHERE ClassID = _ClassID AND username = > _Username AND Password2 = MD5(v_password); > > END $$ > > DELIMITER ; > > However, when I execute it with a parameter, that should return a > UserID, it never returns anything. If I modify the Select-statement > and just execute it as normal SQL with the same parameters, it works > fine. Any ideas? Where are you expecting it to return the UserID to. you don't seem to have defined an output. |