We will help you with your scripts, but not write them for you! Pejone's solution is the standard method.
Begin your table as normal (heading cells etc), then call the results as a row. For every row print a row in your table containing the results, and then end the table, voila!
If you can't structure the query correctly, then try to make it into an array and use this array to generate the table. It's all about learning how to use loops and generate a table row each time!