You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Get/Read one row data by matching a column data:
154
-
To get data from a row by matching data with a column, call ```getOneRowData(columnNumber, valueToMatchWithTheColumn)``` or ```getOneRowData(columnName, valueToMatchWithTheColumn)```
153
+
### Get/Read/Search one/multiple row data by matching a column data:
154
+
To get data from one/multiple rows by matching data with a column, call ```searchInColumn(columnNumber, valueToSearch, limit)``` or ```searchInColumn(columnName, valueToSearch, limit)```
155
155
example:
156
156
```
157
-
Cursor res = easyDB.getOneRowData(1, "data");
157
+
Cursor res = easyDB.searchInColumn(1, "data", 1); // Here we passed limit = 1. Thus it will return only one row data with the matched column value
158
158
if (res != null) {
159
159
res.moveToFirst(); // Because here's only one row data
160
160
String ID = res.getString(0); // Column 0 is the ID column
@@ -166,15 +166,18 @@ if (res != null) {
166
166
or
167
167
168
168
```
169
-
Cursor res = easyDB.getOneRowData("ID", "data");
169
+
Cursor res = easyDB.searchInColumn("ID", "data", -1); // Here we passed limit = -1. Thus it will return all the rows with the matched column values
170
170
if (res != null) {
171
-
res.moveToFirst(); // Because here's only one row data
172
-
String ID = res.getString(0); // Column 0 is the ID column
173
-
String c1 = res.getString(1);
174
-
String c2 = res.getString(2);
171
+
while (res.moveToNext()) {
172
+
String ID = res.getString(0); // Column 0 is the ID column
173
+
String c1 = res.getString(1);
174
+
String c2 = res.getString(2);
175
+
}
175
176
}
176
177
```
177
178
179
+
> Please DO NOT pass ```limit = 0``` as the parameter
180
+
178
181
### Match data from multiple columns:
179
182
To check if some values exist or not in the database, first call ```getAllColumns()``` to get all the column names like this:
0 commit comments