Re: User defined function in a mysql query

From: Date: Wed, 10 Dec 2003 16:37:49 +0000
Subject: Re: User defined function in a mysql query
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-31968@lists.php.net to get a copy of this message
From: "antonio bernabei" <tonibern@tin.it> > I need to make a join between two tables. And I can use the mysql_query > function: this is ok. > The problem arises because I need to apply a user defined function to a > field of one of the two tables and the rule for the join is WHERE > table1.filed1=function(table2.field2). > But I receive a lot of errors: it seems like is not allowed to put such a > function in the text of the query. Or there is a possibility? You should be able to do this.. you're just doing a comparison. Although it'll negate any indexes you have and make for a very slow join. We are talking about a MySQL function, right... and not a PHP one?? ---John Holmes...

« previous php.db (#31968) next »