Dear Georg,

Thanks for replying. I have read the mysql manual but unfortunately have
not been able to find the answer. I realize UDFs can have field names as
their parameters, as in select my_udf(fld1, fld2, fld10) from myTable; but
here the field names have to be specified explicitly. What I'm wondering
is there a shortcut way to specify all the fields from myTable, using the
* notation. Just as normally I can say
select * from myTable;
can I write a UDF to handle
select my_udf(*) from myTable; ?
There is the builtin function
select count(*) from myTable;
But the manual does not say how this is to be accomplished using UDFs.

> UDF functions can return STRING (char *), INTEGER (long) OR REAL (double).
> Please read the Manual: http://www.mysql.com/doc/A/d/Adding_UDF.html

Indeed UDFs can return (char *), but my question is, is there a way to
return an array of intergers (int *)? or some more complicated structure,
say, (myStruct *)? If UDFs are limited to returning (char*), (long) or
(double), does that mean the only way out is to turn (myStruct*)  into
some kind of string and return it as (char*)?

Thanks a lot,

fei


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to