I don't know much about this but this thread may help.
This question is unrelated to the original "How to get records from multiple tables using lib/tablelib.php (set_sql)" question, if you need more help you may want to start a new discussion so that others see the new question.
There's a General Developer Forum which may be better for this sort of question.