Help with a query
| From: | Jonathan Villa | Date: | Mon, 31 Mar 2003 15:41:59 +0000 |
| Subject: | Help with a query | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-26055@lists.php.net to get a copy of this message | ||
I can't figure this query out.
I want to pull data from 2 tables but using a primary key from one.
Here is what I think it should look like.
SELECT item_id, subtotal, quantity from shopping_cart WHERE order_id =
(SELECT order_id FROM orders WHERE session_id = session_id()) AND
customer_id = $customer_id;
-Jonathan