> 
> I would like to select all 'b' from Table_1 WHERE a
> = '2' and then to 
> select all 'd' from table_2 with 'b' from previous
> result.
> 
> Table 2 is the Table with UserNames (d) and Table 1
> is the table with 
> 'marked' UserID's (b).
> 
If I understand you correctly, its sounds like you
want to do the following:

$sql = "
SELECT t1.b,
       t2.d
FROM Table_1 AS t1
LEFT JOIN Table_2 AS t2
ON (t1.b = t2.d)
WHERE t1.a = '2'";


=====
~Rachel


        
                
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/

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

Reply via email to