CREATE PROCEDURE GET_USER_ACL_BY_USERNAME (IN USR VARCHAR(255))
BEGIN
SELECT ACL.Action, ACL.Path FROM ACL
WHERE ACL.UserGroup
IN (
SELECT Usergroup.GroupID
FROM Users, UserGroup, Privilages
WHERE Users.UserID = Privilages.UserID
AND Usergroup.GroupID = Privilages.GroupID
AND Users.UserName = USR
);
END|
CLIENT_MULTI_RESULTS
Tell the server that the client can handle multiple result sets from multiple-statement executions or stored procedures. This is automatically set if CLIENT_MULTI_STATEMENTS is set. See the note following this table for more information about this flag.
If your program uses the CALL SQL statement to execute stored procedures that produce result sets, you must set the CLIENT_MULTI_RESULTS flag, either explicitly, or implicitly by setting CLIENT_MULTI_STATEMENTS when you call mysql_real_connect(). This is because each such stored procedure produces multiple results: the result sets returned by statements executed within the procedure, as well as a result to indicate the call status.
There are 10 types of people in this world, those who understand binary and those who don't