Re: [PHP] Query for two fields with the same name

2006-04-20 Thread admin
Maybe something like this : $connection = SELECT t2.id AS idtwo, t1.id AS idone FROM connection AS t1, pr AS t2 WHERE t1.area_id = '$gateway_link' AND t1.pr_id = t2.id; This is probably a simple question, but I can't seem to find the answer online. I'm using this query: $connection =

Re: [PHP] Query for two fields with the same name

2006-04-20 Thread Richard Lynch
On Wed, April 19, 2006 5:55 pm, Kevin Murphy wrote: $connection = select * from connection, pr WHERE connection.area_id = '$gateway_link' and connection.pr_id = pr.id; Both tables have a field called ID but they have different information in them. $row['id'] gets me the one from the table

[PHP] Query for two fields with the same name

2006-04-19 Thread Kevin Murphy
This is probably a simple question, but I can't seem to find the answer online. I'm using this query: $connection = select * from connection, pr WHERE connection.area_id = '$gateway_link' and connection.pr_id = pr.id; Both tables have a field called ID but they have different

Re: [PHP] Query for two fields with the same name

2006-04-19 Thread Jochem Maas
NOT a php question. Kevin Murphy wrote: This is probably a simple question, but I can't seem to find the answer online. I'm using this query: $connection = select * from connection, pr WHERE connection.area_id = '$gateway_link' and connection.pr_id = pr.id; doing SELECT * FROM bla is