NYCPHP Meetup

NYPHP.org

[nycphp-talk] Native PHP functions in MySQL?

Dan Cech dcech at phpwerx.net
Fri Dec 26 12:11:55 EST 2003


Actually there is a UDF which can execute PHP code already.  Written by 
David Sklar, you can find it here:

<http://www.sklar.com/page/article/myphp>

As for usefulness, it could be very handy if you wanted to for instance 
implement partial order nested sets:

<http://www.dbazine.com/tropashko4.html>

There are plenty of situations where the ability to execute php code 
could be a Good Thing, though for most cases the same results can be 
achieved with SQL-99 stored procedures, which are supported in MySQL 5.x 
and much more portable than embedded php code.

Dan Cech

jon baer wrote:

> i noticed this project just recently:
> 
> http://freshmeat.net/projects/judf/?topic_id=66
> 
> basically a wrapper using mysql w/  CREATE FUNCTION foo RETURNS STRING
> SONAME "foo.so"; to run Java natively ... so you could do this:
> 
> mysql> SELECT foo("classes/MyClasss", COLUMN1, COLUMN2) FROM foobar;
> 
> i wonder what the major advantages of this really are or if its overkill, im
> assuming the same thing could be done w/ php ... but beyond filtering what
> would it be good for?
> 
> - jon
> 
> pgp key: http://www.jonbaer.net/jonbaer.asc
> fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47
> 
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
> 




More information about the talk mailing list