On Mon, 13 Sep 2004 07:14:31 -0700 (PDT), Dan McCullough
<[EMAIL PROTECTED]> wrote:
> here is the code.
> 
> $sql = "select * from dealer, orders where orders.status='10' and
> orders.dealerid =

If you want to associate the orders with the dealer, you probably want
to do a LEFT JOIN with the relevant field.

SELECT *
FROM dealer
LEFT JOIN orders
  ON dealer.dealerid = order.dealerid
WHERE order.status = '10'
GROUP BY dealer.dealerid

or something like that.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to