SQLite revQueryDatabase "where" param won't detect invalid target
mr.prmurray at gmail.com
Tue Nov 18 23:14:36 CST 2008
When trying to detect that an entry in a table is missing, revQueryDatabase
"SELECT... WHERE..." is returning an integer (cursor) result when the table
is actually empty or the search value has never been inserted into the
The following code is preceded by the creation of the table before any
records are inserted:
put "SELECT * FROM players WHERE playerID=:1" into doSQL
put "abc1234" into anonID
put revQuerydatabase(wgdbConID,doSQL,"anonID") into playersCursor
answer doSQL & ":" & anonID &" result = " & playersCursor -- shows the
result (playersCursor value is always an integer)
The result (playersCursor) is ALWAYS an integer, no matter if there are any
entries in the table or not, and no matter what value is given to the anonID
I need to be able to determine if the record with the specified "playerID"
exists or not.
Does anyone have any idea where the problem is?
Any help would be greatly appreciated. Thanks.
More information about the use-livecode