$numQuery1 = "SELECT driver.*, driver_rental.*, avg(comment.on_time)+avg(comment.friendly)+avg(comment.language_skills)+avg(comment.professional) as ranking
FROM comment
LEFT JOIN driver
ON
driver.userid = comment.driver_id
LEFT JOIN driver_rental
ON
driver.email = driver_rental.email
WHERE
($driver_rental IS NOT NULL AND $driver_rental != '') AND (car_type_1>=$_SESSION[car_type_1] OR car_type_2>=$_SESSION[car_type_1])";
if the comment table have no driver_id record, the result is null, can i ignore comment table but in select statement caot without it ?
