All pastes #468165 Raw Edit

Penggu

public php v1 · immutable
·published 2007-05-02 22:53 UTC
rendered paste body
 314       $query = "SELECT DISTINCT `students`.`CURRENT_YEAR`, `students`.`STUDENTNUM`, `school_year_levels`.`description` 315       FROM 316          `students` 317       INNER JOIN `school_year_levels` ON (`students`.`CURRENT_YEAR` = `school_year_levels`.`year`) 318       LEFT JOIN `accounts_normal` ON (`students`.`STUDENTNUM` = `accounts_normal`.`usernum`) 319          AND `accounts_normal`.`type`='students' 320       WHERE 321          `students`.`data_of_year`='".date("Y")."' 322          AND `accounts_normal`.`username` IS NULL 323          AND `students`.`CURRENT_YEAR` <> ' 0' 324          AND `students`.`CURRENT_YEAR` <> '99' 325          AND LEFT(`school_year_levels`.`year`,1) <> '*' 326       ORDER BY 327          `school_year_levels`.`numeric_equiv`";I get the error:Error[369]: Unknown column 'students.STUDENTNUM' in 'on clause'