It sounds like you don't have a good understanding of SQL concepts. You should try reading some tutorials for SQLite or even MySQL online. Unlike what you've been doing thus far, SQL is very easy to do terribly and horribly wrong if you're just copying and pasting from examples you've found/are given.
PHP Code:
temp.req = requestSQL("SELECT * FROM table", true);
temp.rows = temp.req.rows;
for (temp.row : temp.rows) {
// you can access data via temp.row[0], temp.row[1], etc...
// or with the column name like temp.row.submitter, temp.row.title, ...
//
// the latter is preferred
echo("Row: " @ temp.row);
}
Obviously you can only do this serverside so you will have to send it to the client just like you'd send any other data.