I'm used to MSSQL, not MySQL so hopefully this is an obvious fix but I've reviewed a lot of questions on here and manuals etc and can't see why I'm getting this error...
I've written a complex procedure which isn't working; I've isolated the issue to how I'm passing in parameters. I've replicated my issue in a small dummy procedure (below):
DELIMITER//
CREATE PROCEDURE testProcedure(IN startSite CHAR(2), IN endSite CHAR(2))
SELECT * FROM sys_sites WHERE ssi_uid = startSite;
SELECT * FROM sys_sites WHERE ssi_uid = endSite;
END
//
DELIMITER;
When I execute this, I get the following error:
CREATE PROCEDURE testProcedure(IN startSite CHAR(2), IN endSite CHAR(2))
SELECT * FROM sys_sites WHERE ssi_uid = startSite; SELECT * FROM sys_sites WHERE ssi_uid = endSite; END
1054 - Unknown column 'endSite' in 'where clause' Time: 0s
Please - can anyone advise what obvious thing I'm missing here?