Hello Everyone,
I've been working with DBUtils and was wondering how to implement the "WHERE" and 'ORDER BY" clauses for a tableview.
B4J 2.8 and Windows 8.1, Asus Laptop X750J
Do I replace the Null with a Map, or Array that contains the WHERE and ORDER BY?
Could someone re-write this DBUtils statement to show an example?[/Code]
NOTE:
If the code sql statement stops at 'loadlist', then goes on with Null, 0, loads_tv - then the table populates, but without some conditions I am looking for.
I've been working with DBUtils and was wondering how to implement the "WHERE" and 'ORDER BY" clauses for a tableview.
B4J 2.8 and Windows 8.1, Asus Laptop X750J
B4X:
DBUtils.ExecuteTableView(RMSQL, "SELECT [load_ref], [loadid], [pu_date], [del_date],[paid_miles],[money_offered],[pckid],[delid],[completed] FROM loadlist WHERE completed = 0 ORDER BY load_ref DESC", Null, 0, loads_tv)
Do I replace the Null with a Map, or Array that contains the WHERE and ORDER BY?
B4X:
DBUtils.ExecuteTableView(RMSQL, "SELECT [load_ref], [loadid], [pu_date], [del_date],[paid_miles],[money_offered],[pckid],[delid],[completed] FROM loadlist WHERE ? ORDER BY ?", ("completed = 0", "load_ref DESC"), 0, loads_tv)
Could someone re-write this DBUtils statement to show an example?[/Code]
NOTE:
If the code sql statement stops at 'loadlist', then goes on with Null, 0, loads_tv - then the table populates, but without some conditions I am looking for.
Last edited: