PATCH: Subselects in mysql

From: Date: Tue, 11 Jul 2000 10:21:58 +0000
Subject: PATCH: Subselects in mysql
Groups: php.dev 
Request: Send a blank email to php-dev+get-24174@lists.php.net to get a copy of this message
Hello, because MySQL doesn't support subquery's: (SELECT * FROM Table1 WHERE Col1 IN (SELECT Col2 FROM Table2)) i created a patch which implements this within PHP itself. I added one function to php_mysql.c, mysql_ext_query. This function is able to rewrite the subselect to a normal query. It only works for simple subquery's and is not binary safe at this moment. More work is needed, but I would share it with all php-users. The attached patch works fine and is tested on my three servers at home. I don't have a cvs account, so I posted the patch here. Greetings, -- Derick Rethans JDI Media Solutions H.v.Tussenbroekstraat 1 6952 BL Dieren The Netherlands e-mail: d.rethans@jdimedia.nl http://www.jdimedia.nl/

« previous php.dev (#24174) next »