sql - Android SQLITE does not execute queries with arguments -


i fail queries arguments, doing wrong?

i need following query:

cursor = bd.rawquery("select * user user.name=?", new string[]{"%"+nombre+"%"}); 

i tried following , fail:

cursor = bd.rawquery("select * user name=?", new string[]{"%"+nombre+"%"});  cursor = bd.rawquery("select * user user.name=?", new string[]{nombre}); 

this works:

cursor = bd.rawquery("select * user ", null); 

thanks help

please try this, list out users name foo.

cursor = bd.rawquery("select * user name = ?", new string[] {"foo"});

or

cursor = bd.rawquery("select * user name ?", new string[] {"foo"});

sqlitedatabase rawquery document reference


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -