I am using prepared statemens with PDO in my project. When MySQL queries are written inside a PDO prepare() function, MySQL keywords, tablenames, etc., are different colors and autocomplete also works. Here's what one query looks like:
Unfortunately, I sometimes need to use the IN(...) function in queries to select rows with a column value in a list of values. For example: "id IN(1,2,3,4,5)". The only reasonable way to do this with PDO (as far as I'm aware) is to directly inject it into the query string (there doesn't seem to be any way to bind the comma separated list of values to the query because when you do that it's treated as a string instead of a list of values). So the only solution I'm aware of is to do this: "id IN(' . $idString . ')".
This works, but the problem is that doing this causes the entire query to turn green (no more colors or autocompletion), like this: