So the one page takes any arbitrary query, and forwards the query on the client's behalf, and returns the dataset to the client.
Im not sure how the provided api is better than what ive suggested; they seem to me equivalent, but xmysql a lot more annoying to write, and xmysql is doing a lot more work for what looks like no benefit