This strikes me as the understatement of the year:
> NOTE: It is recommended that you do NOT create queries browser-side to run on the server as this massively increases your exposure to SQL Injection attacks.
It should be more than recommended against. If you accept SQL built on the client, you should have your keyboard taken away and replaced with one of those little plastic xylophones they give to three year olds.