I am sure this has a very easy answer, sorry for that but I am still learning MySQL stuff!
I have the following query:
$id=$_GET['id'];
$result = mysql_query ("SELECT * FROM orders LEFT JOIN customers ON (customers.id = orders.customer) WHERE customer = $id");
This is used to take the id from the referring page, and display all orders made by that customer. This works fine.
I then want to link to each order by order id. This is found in the table orders as id (auto incrementing field). So I used:
$row["id"]
However, this gives me the customer id (id in the customers table), I assume because of the join.
I tried:
$row["orders.id"]
but this gave nothing at all.
What do I need to do to get the order id?
Thanks in advance for any assistance, it is greatly appreciated!