MySQL create function won't return sets -
I can not get this work done with MySQL 5.x This function should return all the relevant rows to the selection-statement:
create build getuids (root INT) Set as INT $ $ INST Select Return Date WHERE removed from pages = 0 END $$ language 'SQL';
Any thoughts that I have done wrong?
A MySQL function can not return a set of lines or rows in MySQL to only one stored procedure rows Can return This is true for MySQL 5.4 and the use of stored procedures in the form of page view tables or where segment values in the questions are also unavailable.
If you want to use a function, you can do the best so that GROUP_CONCAT can be used to get values in comma separated list:
Then you need to check the UIDs in your selection statement, you can use the FIND_IN_SET function like this:
SELECT. .. WHERE FIND_IN_SET (My_field, get_uids ());
PS I originally posted links on the GROUP_CONCAT and FIND_IN_SET functions on MySQL website, but Stack Overflow will only allow me to use a link to be new.
Comments
Post a Comment