Sub LoadExpenseCategories
'clear the global map variable
expense_categories.Initialize
'initialize the mysql class
Dim ec As SDUIMySQLE
ec.Initialize("sithasodaisy", "expense_categories", "id", "")
'link the mysql class to datasource
app.SetBackEndMySQLE(ec)
'we want the id and name fields
ec.SelectAll(Array("id", "name"), Array("name"))
ec.JSON = banano.CallInlinePHPWait(ec.MethodName, ec.Build)
ec.FromJSON
'we get the id and name fields from each object in the returned records
'and create a map
expense_categories = SDUIShared.GetKeyValues(True, ec.result, "id", "name")
'load item to combo
'cboCategory.SetItems(expense_categories)
End Sub