I use this code to search for Column A. What modification should I make if I want to search Column A and Column B simultaneously?
String sql = "SELECT * FROM " + TABLE_NAME +
" WHERE " + ColumnA + " LIKE ? ORDER BY " + ColumnA + " LIMIT 100";
I've tried this but it's not work:
String sql = "SELECT * FROM " + TABLE_NAME +
" WHERE " + ColumnA + " LIKE ? ORDER BY " + ColumnA + " LIMIT 100 OR SELECT * FROM " + TABLE_NAME +
" WHERE " + ColumnB + " LIKE ? ORDER BY " + ColumnB + " LIMIT 100";
Any mistake I made?
Aucun commentaire:
Enregistrer un commentaire