jtrechter
04-29-2005, 06:40 AM
If I have a query:
$sql= mysql_query("SELECT a.id, b.id FROM table1 a, table2 b WHERE a.id=b.id");
$get= mysql_fetch_query($sql);
Normally, if the query is selecting just from one table, then I just use:
echo $get[id]
But how do you output both a's id and b's id?
I tried echo $get[a.id] but it doesnt work. Thanks.
$sql= mysql_query("SELECT a.id, b.id FROM table1 a, table2 b WHERE a.id=b.id");
$get= mysql_fetch_query($sql);
Normally, if the query is selecting just from one table, then I just use:
echo $get[id]
But how do you output both a's id and b's id?
I tried echo $get[a.id] but it doesnt work. Thanks.