Error in query SELECT score,stat1,stat2,stat3,stat4,stat5,stat6,stat7,stat8,stat1s,stat2s,stat3s,stat4s,stat5s,stat6s,stat7s,stat8s,numpredictions, unix_timestamp(snapshot_date) as snapshot_date,score,rank,rank_by_pos FROM f_infoforecasthistory WHERE nflplayer_id=2900 AND year_id = '2004' AND week_id='18' AND predictor_subset="AL" You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',rank_by_pos FROM f_infoforecasthistory WHERE nflplayer_id=2900 AND year_id = '' at line 1