sqlite - how do I get a one row result back? (i.e. "nrows" gives an iterator, "exec" doesn't give a result)

How can I get a single row result (e.g. in form of a table/array) back from a sql statement. For example this one:

SELECT * FROM sqlite_master WHERE name =‘myTable’;

So far I note:

a) using “nrows”/“rows” it gives an iterator back
b) using “exec” it doesn’t seem to give a result back(?)

Specific questions are then:

Q1 - How to get a single row (say first row) result back?

Q2 - How to get row count? (e.g. num_rows_returned = db:XXXX(sql))

[import]uid: 140210 topic_id: 25599 reply_id: 325599[/import]

Hey Greg,

I believe this is talked about here: http://developer.anscamobile.com/forum/2010/11/09/sqlite-single-record-selection [import]uid: 52491 topic_id: 25599 reply_id: 103484[/import]

thanks - seems to be no direct one-liner then for the moment [import]uid: 140210 topic_id: 25599 reply_id: 103692[/import]