Code:
SELECT `%s` FROM `%s` ORDER BY `id` ASC
This and the whole function you posted in general is -
bad practice-!
Don't use it. Not every table has an 'id' field. Aswell, only a small portion of your SELECT-queries will actually look like this query.
Returning results like that won't work with BlueG's plugin in combinantion with threaded queries as the plugin will call a callback once the query is completed successfully. You'll have to think about another way to process your presented wish.