I have an annoying problem where if I execute the following manually, It works fine.
SELECT * FROM data
WHERE ip = '10.0.0.1'
LIMIT 10
Yet, If i put this in a stored proc. It fails because the WHERE needs to have the quotes?
For example, If i create the following stored PROC.
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetData`(IN `_ownerip` VARCHAR(32) CHARSET utf32)
NO SQL
SELECT * FROM data
WHERE ip = _ownerip
LIMIT 10
it fails.
Its like the _ownerip needs to be like '_ownerip' rather than without the quotes.
Yet if I quote, it it fails. Ive tried " and backticks `
Cant figure out what to do.
Any thoughts?