Re: help with Mysql Query...

From: Date: Tue, 25 Sep 2001 03:46:31 +0000
Subject: Re: help with Mysql Query...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68638@lists.php.net to get a copy of this message
Don't use subselect in MySQL, MYSQL have not completed it now , Use "join" to instead it. "Christian Dechery" <cdechery@easynet.com.br> wrote in message news:5.0.0.25.2.20010924221946.02aa14d0@pop-gw.easynet.com.br... > I'm having trouble puting up a query in Mysql because of his lack of SQL > syntax. > > I have a table A and a table B... I want all occurences from A there are > not in B... > > in ANSI SQL... it's nothing more than: > > select a.id, a.name from table_a a, table_b b where a.id NOT IN (select id > from table_b) > > and that's it... but in Mysql, since there are no sub-selects, I'm burning > my brains out and not getting it... I don't wanna create a temp table like > the manual suggests... this is way NOT efficient... I'd rather do it in PHP > code than having a query that creates a temporary table, then drop it... > > > _____________________________ > . Christian Dechery > . . Gaita-L Owner / Web Developer > . . http://www.webstyle.com.br > . . http://www.tanamesa.com.br >

« previous php.general (#68638) next »