[MySql] More help with joins

wxdqz

New Member
I am starting to feel dumb.. LOL

Here is my query:

$sSelect = "SELECT edata.eed_id, edata.eed_ssn, edata.eed_fname, edata.eed_mi, edata.eed_lname, bdata.bed_formin ";
$sFrom = "FROM EE_data edata LEFT JOIN BEN_data bdata ON (edata.eed_id = bdata.eed_id) ";
$sWhere = "WHERE (bdata.bed_formin <> 'Y') ";
$sOrderBy = "ORDER BY edata.eed_lastupdate";


Now what i want back is a list of all EE_data where BEN_data.bed_formin is NOT equal to 'Y' (yes)

But not all EE_data has a linked BEN_data.... and I want those records as well.....
just as long as bdata.bed_formin isnt 'Y' I want it...

I thoguht this query was working properly untill i realised that it was returning bdata.bed_formin as null for all returned rows. What am I doing wrong?
 
Top