[snip] $query = "SELECT empnum,name,hdate,Photo,(YEAR(Curdate()) - YEAR(hdate)) as timein FROM emp2 where mo nth(hdate)=$mymonth and empnum < "9999" order by timein"; [/snip]
Change to single quotes around data $query = "SELECT empnum,name,hdate,Photo,(YEAR(Curdate()) - YEAR(hdate)) as timein FROM emp2 where month(hdate)=$mymonth and empnum < '9999' order by timein"; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]