Ah ok, never used virtual tables. I would suggest however that while you are trying to get it to work you strip it to a bare minimum, and create a virtual table with a single row. If nothing else it will make it easier for other people to follow.
Also, you seem to be sending multiple queries...