It becomes even weirder...
I've been looking in the wrong query giving me the error.
The query giving me the error is this one:
PHP Code:
$vraag_app="SELECT * FROM app_".strtolower($rij[acr])." WHERE (dag='".$dagma."' AND maand='".$maandma."' AND jaar='".$jaarma."' AND toon ='1' AND id !='1') AND COALESCE(TIME_TO_SEC(beg_uur),0) + COALESCE(TIME_TO_SEC(tijd),0) + COALESCE(TIME_TO_SEC(tijd_bat),0) + COALESCE(TIME_TO_SEC(tijd_bet),0) > TIME_TO_SEC('12:00:00') ORDER BY id";
this is the HTML output:
Code:
SELECT * FROM app_cja WHERE (dag='23' AND maand='1' AND jaar='2006' AND toon ='1' AND id !='1') AND COALESCE(TIME_TO_SEC(beg_uur),0) + COALESCE(TIME_TO_SEC(tijd),0) + COALESCE(TIME_TO_SEC(tijd_bat),0) + COALESCE(TIME_TO_SEC(tijd_bet),0) > TIME_TO_SEC('12:00:00') ORDER BY id
And this is the error:
Code:
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 'AND toon ='1' AND id !='1') AND COALESCE(TIME_TO_SEC(beg_uur),0) + COALESCE(TIME' at line 1
The weird thing about it: the only difference between this query and the query before, wich is not giving me an error, is the > before TIME_TO_SEC('12:00:00') instead of <= TIME_TO_SEC('12:00:00')
This is freaking me out
there must be a ' or a ) or something else missing or in the wrong place but I can't find it :'(
Bookmarks