Is there a way to call a procedure (that uses a SELECT statement) inside of a function? Whenever I try to call it I get an error stating that SELECT statements aren't allowed in functions:

ERROR 1314 (0A000): Statements like SELECT, INSERT, UPDATE (and others) are not allowed in a FUNCTION