"David Godsey" <[EMAIL PROTECTED]> wrote on 03/24/2006 12:55:29 PM:
> This is not a typically thing that anyone would expect Mysql to do, > however with the application I am writing it would be helpful. Here goes: > > The application stores raw data from a satellite, along with a > configuration of how to read the data. So of the data types are Int > Arrays and Float arrays. Each can have conversion parameters to apply to > the data. So I have to loop through this raw data, converting to the > correct type, and applying some convertion parameter (say multiply by .26 > for a float). > > So I will pass a function (a UDF function) a binary string, perform some > conversion, then I would like to return it as an array. > > I know, I know, sounds like something that should be done in the > presentation layer, howerver if possible, I would like to provide common > data presentation to multiple presentation layers (written in different > languages). > > So is there anyway to return an array in mysql? > > Accomplishing the impossible means only that the boss will add it to your > regular duties. > > David Godsey > Depending on your version of MySQL, you could return the results of a query created within a stored procedure. Or you could set up a view or .... Anyway, since array data types are not one of the data types supported by MySQL I think the closest you can get is either to return the data as a table or as the results of a query or as the content presented by a view. If you think about it, a recordset is very similar to a two-dimensional array. Shawn Green Database Administrator Unimin Corporation - Spruce Pine