maybe someone can help me here.
I create a test DB and test table for login for me to learn on how to use stored proc on my program but after making the procedure i was not successful to see the result to bad.
anyway here's my table.
CREATE TABLE users (
id bigint(20) NOT NULL auto_increment,
uname varchar(50) collate latin1_general_ci default NULL,
passwd varchar(50) collate latin1_general_ci default NULL,
created_t datetime default NULL,
creator_id bigint(20) default NULL,
access_level_id bigint(20) default NULL,
PRIMARY KEY (`id`)
)
and here is my procedure.
DELIMITER $$
DROP PROCEDURE IF EXISTS db.users_login$$
CREATE DEFINER=root@localhost
PROCEDURE users_login(IN unameVal varchar(50) OUT unameVal varchar(50))
BEGIN
DECLARE uname varchar(50);
DECLARE passwd varchar(50);
SELECT * FROM users WHERE uname=unameVal;
END$$
DELIMITER ;
i call it by call users_login('vher'); i have 1 record on the table with the username vher.
what do you think is the problem?
thank you in advance.