Lucio muito obrigado....
mais numca usei o args,,,, estou sofrendo um pouco
seria isso?
public Cursor getAcessoriaSearchDB(Context context, String search) {
// TODO Auto-generated method stub
String where = "acess_tag LIKE ?";
String[] whereArgs = new String[] { "%" + search + "%" };
String[] query = {"_id, acess_nome, acess_tag, acess_pdf, acess_video, acess_thumb"};
String table = "tbl_acessoria";
return this.myDataBase.query(true, table, query, null, whereArgs, where, null, null, null);
}
2013/6/1 luciofm <luciofm@gmail.com>
String where = "COLUNA LIKE ?";String[] whereArgs = new String[] { "%" + search + "%" };Lúcio Maciel
luciofm@gmail.comOn Sat, Jun 1, 2013 at 5:09 PM, Felippe dos Santos Ferreira <felippenasuacasa@gmail.com> wrote:
alguem jah usou o LIKE--do SQLITE do androidestou tentando usar mais sem sucesso segue o codigo....public Cursor getAcessoriaSearchDB(Context context, String search) {// TODO Auto-generated method stubString[] args = {search};String query = "SELECT _id, acess_nome, acess_tag, acess_pdf, acess_video, acess_thumb FROM tbl_acessoria where acess_tag LIKE %?%";return this.myDataBase.rawQuery(query, args);}
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.--
You received this message because you are subscribed to a topic in the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/androidbrasil-dev/cSxAJaX-gNs/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.






0 comentários:
Postar um comentário