=?iso-8859-2?Q?Ji=F8=ED=20=A9krabal?= writes:
> Hi all,
> I'm currently working on project, where I need implement some functions to formate
> SQL queries.
> It's necessary to add these functions into MySQL.
> I read about UDF (user def. functions) and I mean, that it is almost what I want.
> For examlple,
> QUERY() ... UDF function, whitch returns string like: "SELECT * FROM tab;"
> What I need is to execute this string like MySQL query.
> I know, that it could be done by PHP script (function) like this
> >function DB_Query( $query, $connection )
> > {
> > $tmpquery = "SELECT QUERY( $query );";
> > $result = MySQL_Query( $tmpquery, $connection );
> > $entry = SQL2_Fetch_Array( $result );
> >
> > $dbquery = $entry[ 1 ];
> > $result = MySQL_Query( $tmpquery, $connection );
> >
> > return ($result);
> > }
>
> But the problem is, that it requires two DB calls.
> It's necessary to add these functions into MySQL, because if I use other API (for
>example
> DBI, etc.) I need to write all functions like above again.
>
> Is it possible to create QUERY() function which would execute the query?
> (not to return string with query, but return query results)
>
> thanx
>
> --Nykolas
Hi!
No, it is not possible, but stored procedures are planned to be
implemented with the end of this year.
Regards,
Sinisa
____ __ _____ _____ ___ == MySQL AB
/*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED]
/*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaca, Cyprus
/*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____
^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
/*/ \*\ Developers Team
---------------------------------------------------------------------
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