I am studying for the mysql certification and the way i learn is by doing, I failed it before by one question and if i had of paid more attention to stored procs i would have gotten it. any i am making up some funky scenarios that i would actually use so here is one that i am stumped on.
/*TABLE STRUCTURE */
CREATE TABLE `members` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`name` varchar(255) default NULL,
`email` varchar(255) default NULL,
PRIMARY KEY (`id`)
);
/* PROCEDURE STRUCTURE */
USE WOL_STATISTICS;
DELIMITER $$
CREATE PROCEDURE `select_user`
(
IN `idnum` INT(11),
OUT `name` VARCHAR(255),
OUT `email` VARCHAR(255)
)
SQL SECURITY DEFINER
LANGUAGE SQL
NOT DETERMINISTIC
BEGIN
SELECT `name`, `email` FROM `members` WHERE `id` = `idnum`;
END $$
DELIMITER ;
/* CALL STATEMENT */
CALL select_user(20, @name, @email);
SELECT @name, @email;
I keep getting back null values can anyone tell me why??