View Single Post
Old 01-06-2008, 06:40 PM   #5 (permalink)
short
The Visitor
 
short's Avatar
 
Join Date: Jan 2008
Posts: 3
Thanks: 0
short is on a distinguished road
Default

PHP Code:
$sql->select
    array( 
        
'what'    => 'p.project_name',
        
'from'    => 'projects p',
        
'join'    => array( 
            array( 
                
'type'  => 'left',
                
'table' => 'ratings r',
                
'on'    => 'r.project_id=p.project_id',
            ), 
        ),
        
'groupby' => 'p.project_id',
        
'orderby' => 'p.project_name ASC',
        
'where'   => 'r.rating<>"NULL"' 
    
)
); 
short is offline  
Reply With Quote