Re: check two tables at same time?

From: Date: Tue, 25 Jun 2002 00:02:56 +0000
Subject: Re: check two tables at same time?
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-20074@lists.php.net to get a copy of this message
Mike, I know quite a bit about joins and I'm not sure if they are the answer. Basically I want to save myself two SQL statements. I'd like to combine: select * from table1 where cond=val select * from table2 where cond=sameval into one sql statement. the two tables are identical in structure thats why i think there should be some way to do this. Thanks! - Noah ---------------------------------- TradeMyTraffic! Web Services http://www.trademytraffic.com <szii@sziisoft.com> wrote in message news:006601c21bd8$4b1fdb20$fd02a8c0@surfmetro.com... > SQL JOINs... > > http://www.mysql.com/doc/J/O/JOIN.html > > -Mike > > ----- Original Message ----- > From: "Noah Spitzer-Williams" <noahsw@cyberdude.com> > To: <php-db@lists.php.net> > Sent: Monday, June 24, 2002 4:21 PM > Subject: [PHP-DB] check two tables at same time? > > > > hey guys, > > > > im trying to figure out a query that i can return rows from more than > > one table at a time. for example, i have two identical tables in structure > > and i want to return rows from both using one query. maybe this will help: > > > > select * from table1 and table2 where condition='value' > > > > is there any way to do this? > > > > thanks! > > > > - Noah > > > > ---------------------------------- > > TradeMyTraffic! Web Services > > http://www.trademytraffic.com > > > > > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.db (#20074) next »