| stored procedure - undefined variable? Hi,
Pretty new to stored procedures and right now just trying to get the following test stored procedure creation to work but instead I get a strange message:
mysql> DELIMITER //
mysql> CREATE PROCEDURE `proc_owner_details`(IN subdomain VARCHAR(20), OUT ositeURL VARCHAR(20), OUT ositeRef INT)
-> BEGIN
-> SELECT siteURL INTO ositeURL, siteRef INTO ositeRef FROM site_details WHERE site_details.siteURL = subdomain LIMIT 1;
-> END;
-> //
ERROR 1327 (42000): Undeclared variable: siteRef
mysql>
It seems it's the second field definition that's always causing a problem as when I swap siteURL and siteRef around then it's siteURL's turn to be an undeclared variable.
When I tried searching for answers all I could find was people having problems with the equivalent of "Undeclared variable: ositeRef"
Any help would be greatly appreciated.
Thanks in advance,
John |