c# - SQLite returns count equal to 0 -
i use sqlite
return count of records match condition. problem count equal 0 (i thought wrong in query, have copied ctrl + c/ctrl + v sqlite gui manager , returns 10 - value...).
the code use is:
_command = _sqlite.createcommand(); _command.commandtype = commandtype.text; _command.commandtext = query; int32 recordsfound = (int32) _command.executescalar(); // 0 here, should 10
my query being used:
select count(*) test_table address match '4 , church'
why work fine in gui, not code?:/
[edit]
but what's strange. if use below query result should 2044 , 2044... wtf?
select count(*) test_table address match '4'
read answer here :
sqlite full text search doesn't find results when space in query
you have escape spaces in query using "". is, 'match' looking 4 whole word.
Comments
Post a Comment