AFAIK, you cannot return a cursor from a function, only valid MySQL data types. If you think about it, this makes sense, since functions are returning what are essentially "fields" to be operated on by the SQL statement. For instance,
SELECT my_func(some_table.some_field) FROM some_table;
The my_func() function must return a scalar data type (single value), not multiple values. Perhaps what you are looking for is a stored procedure, which may *operate* on cursors and return datasets to the calling client by issuing simple SELECT statements?
Jay Pipes
Community Relations Manager, North America, MySQL Inc.
Got Cluster?
http://www.mysql.com/cluster
Personal:
http://jpipes.com