I have a problem where I am unable to return the number of rows in this table. I get an error when trying to store the row count in a variable and also get an error when I try to return it. This is a stored function in MySQL.
I get the two errors: 1.Not allowed to return a result set from a function 2.ROW_COUNT Doesn't exist(isn't called)
Here is my code so far:
BEGIN
declare pageexists int;
declare rowcount int;
select distinct ITU from tblITU
where ITU = inuser;
SET rowcount = COUNT(*) FROM tblITU;
return rowcount;
END
Thanks in advance!