Hi all,
I have the following store procedure that does not work:
DROP PROCEDURE `usp_selectcount`//
CREATE DEFINER=`root`@`localhost` PROCEDURE `usp_selectcount`(
IN pfrom VARCHAR(50)
)
BEGIN
SELECT COUNT(*) AS count
FROM pfrom;
END
It returns error: #1146 - Table 'irishmistusa-db.pfrom' doesn't exist
It's being called as:
call usp_selectcount("workorder");
I'm passing the name of the table "workorder" through the "pfrom" parameter but "pfrom" it's not getting parsed.
Does anyone know what is going on?
thanks.