I have recently started using Zend Studio which has reported as warning the following type of code:
$q = query(\"select * from some_table where some_conditio
So you won't have to rewrite all your code without a decent reason: You can disable the detection of this potential programming error in Window | Preferences, PHP | Semantic Analysis.