If it is just the SQL that you are talking about, then the statement is a SELECT statement.
The output that you need will vary wildly on the data that you need to extract from the table(s).
The basic format would be "Select [fields] from [table(s)] where [criteria];"
A better guide can be found here:
http://www.devhood.com/tutorials/tut...tutorial_id=74
The best way to extract/display data is to use SQL for the extraction and then PHP/HTML/Whatever to display the data. That way you don't have to worry about creating some rocket science code to parse data that you have taken from the db to display. Just my $0.02...
Let me know if this helps.
Thx,
Scyther