arbalest06 <[EMAIL PROTECTED]> wrote:
I want to retrieve only one record in the database with a condition
that may cause a retrieval of many records. The purpose of this is
for me to check only if there is at least 1 record in the database.
You can append a "LIMIT 1" clause to your query. Or do something like
select exists(select ...);
putting your original query inside parentheses (this will produce a
single record with a single column holding either 0 or 1).
Or, you can simply prepare your query as is, but only call sqlite3_step
once and see if it returns SQLITE_ROW or SQLITE_DONE. Then reset or
finalize the statement.
Igor Tandetnik
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------