NYCPHP Meetup

NYPHP.org

[nycphp-talk] had to give you guys a break

Phil Powell soazine at erols.com
Sun Sep 14 20:25:55 EDT 2003


Ok, well, I am using OUTER JOINs in my syntax and it all broke apart until I
combined what I learned in mySQL what what I've always understood INNER JOIN
syntax to be:

    $sql = 'SELECT v.nnet_produkt_varegruppe_navn, ' .
          '       f.nnet_produkt_farge_navn, ' .
          '       s.nnet_produkt_storrelse_navn, ' .
          '       k.nnet_produkt_kvalitet_navn, ' .
          '       p.* ' .
          'FROM nnet_produkt p, nnet_produkt_farge f,
nnet_produkt_varegruppe v ' .
          ' LEFT JOIN nnet_produkt_storrelse s ON
p.nnet_produkt_storrelse_id = s.nnet_produkt_storrelse_id ' .
          ' LEFT JOIN nnet_produkt_kvalitet k ON p.nnet_produkt_kvalitet_id
= k.nnet_produkt_kvalitet_id ' .
          'WHERE v.nnet_produkt_varegruppe_code =
p.nnet_produkt_varegruppe_code ' .
          ' AND f.nnet_produkt_farge_code = p.nnet_produkt_farge_code ';

Unorthodox but it doesn't break.

Phil
----- Original Message ----- 
From: "Hans Zaunere" <hans at nyphp.org>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Sunday, September 14, 2003 8:15 PM
Subject: Re: [nycphp-talk] had to give you guys a break


>
>
> Phil Powell wrote:
>
> > What is the mySQL equivalent then? Online notes prove fruitless. :(
>
> The SQL standard is OUTER JOIN
>
> http://www.mysql.com/doc/en/Data_Manipulation.html
>
>
> H
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list