Re: multi dimension array
| From: | Greg Donald | Date: | Mon, 13 Sep 2004 14:27:35 +0000 |
| Subject: | Re: multi dimension array | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196506@lists.php.net to get a copy of this message | ||
On Mon, 13 Sep 2004 07:14:31 -0700 (PDT), Dan McCullough
<mcwc@rocketmail.com> 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/