Re: check two tables at same time?
| From: | user at domain dot invalid | Date: | Tue, 25 Jun 2002 02:58:45 +0000 |
| Subject: | Re: check two tables at same time? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20081@lists.php.net to get a copy of this message | ||
You are correct in your statements. your SQL statement would look like this...
$query = mysql_query("SELECT *
FROM Table1, Table2 WHERE Table1.Value = Table2.Value ");your Values could be the primary key of each table any other values that you would like to use to match rows. gl -- Seth Noah Spitzer-Williams wrote:
hey guys,im trying to figure out a query that i can return rows from more thanone 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