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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -