public Cursor query (boolean distinct, String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
Query the given URL, returning a <a href="../../../../reference/android/database/Cursor.html">Cursor</a>
over the result set.
Parameters
distinct | true 則使用 DISTINCT 條件傳回資料 |
---|---|
table | table name |
columns | 傳入要取回的欄位名稱陣列,若傳入null時則傳回所有欄位資料 |
selection | SQL WHERE 敘述據的條件資料. null 則傳回所有資料 |
selectionArgs | 若 WHERE 條件敘述內有使用 ? 變數, 則變數資料由此帶入 |
groupBy | SQL GROUP BY 條件設定. |
having | SQL HAVING 條件設定 |
orderBy | SQL ORDER BY 條件設定. |
limit | 限定傳回筆數, null 則不限定 |
Returns
- A
<a href="../../../../reference/android/database/Cursor.html">Cursor</a>
object, which is positioned before the first entry. Note that<a href="../../../../reference/android/database/Cursor.html">Cursor</a>
s are not synchronized, see the documentation for more details.