[sqlite] Choosing the best query plan

2012-08-30 Thread Navaneeth.K.N
Hello, I have two tables named patterns_content and words. CREATE TABLE patterns_content (pattern text, word_id integer, primary key(pattern, word_id)) CREATE TABLE words (id integer primary key, word text unique, confidence integer default 1, learned integer default 1, learned_on date) Given a

Re: [sqlite] why no such column in sqlite3 ?

2012-08-30 Thread Vaclav Peroutka
Rob Richardson wrote: Put single quotes around Testitem: sprintf( sqlquery, INSERT INTO tblTest ( CINDEX, CDATE, CDESCR, CAMOUNT ) VALUES ( 5, 2012-08-29, 'Testitem', 300 )); And around cdate too. There are no dedicated date type in sqlite, 2012-08- 29 is treated as expression ((2012 -

Re: [sqlite] Choosing the best query plan

2012-08-30 Thread Richard Hipp
On Thu, Aug 30, 2012 at 4:02 AM, Navaneeth.K.N navaneet...@gmail.comwrote: Hello, I have two tables named patterns_content and words. CREATE TABLE patterns_content (pattern text, word_id integer, primary key(pattern, word_id)) CREATE TABLE words (id integer primary key, word text unique,

Re: [sqlite] why no such column in sqlite3 ?

2012-08-30 Thread Black, Michael (IS)
As for sprintf what they didn't tell you is that you don't want to use that due to security considerations. If you are getting ANY data from user input they can craft sql injection attacks which sprintf is very susceptible to. Binding the values helps to ensure they can't do that. Michael D.

[sqlite] ONLY phrase in FTS4

2012-08-30 Thread E. Timothy Uy
Hi, if I am using the Porter tokenizer in FTS4 and want an exact stemmed match, how would I proceed? For example, I am if I am looking for completed missions - complet mission, I don't want American completed missions. Is it possible? ___ sqlite-users

[sqlite] about sqlite3_create_function

2012-08-30 Thread YAN HONG YE
who give me a sample about function sqlite3_create_function,I can't search by google. thank you! sqlite3_create_function(db, hello_newman, 0, SQLITE_UTF8, 0, hello_newman, 0, 0); ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] about sqlite3_create_function

2012-08-30 Thread Kevin Benson
On Thu, Aug 30, 2012 at 10:25 PM, YAN HONG YE yanhong...@mpsa.com wrote: who give me a sample about function sqlite3_create_function,I can't search by google. thank you! sqlite3_create_function(db, hello_newman, 0, SQLITE_UTF8, 0, hello_newman, 0, 0);

Re: [sqlite] about sqlite3_create_function

2012-08-30 Thread Kevin Benson
Thgat should have been ...the file func.c. -- -- -- --Ô¿Ô-- K e V i N On Thu, Aug 30, 2012 at 11:10 PM, Kevin Benson kevin.m.ben...@gmail.comwrote: the file*func.c*. ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] SQLITE_MISUE returned from sqlite3_step with inconsistent errMsg

2012-08-30 Thread Daniel Dawson
Hey Guys, I am calling sqlite3_step and checking the return value, Usually I get an SQLITE_DONE, or an SQLITE_BUSY which I handle. However, sometimes I get an SQLITE_MISUSE return code. If I call sqlite3_errmsg straight after receiving the code then I get Database is Locked - The