Sorry but am new to this, but when performing the search to get future date records I always get nothing returned, process_date is a MySQl datetime.
var l_curr_date = application.getDateStamp();
var search_date = utils.dateFormat(l_curr_date,‘yyyy/MM/dd’)
forms.frm_list_current.controller.find()
forms.frm_list_current.process_date > ‘#’+search_date + ‘|yyyy/MM/dd’;
var found = forms.frm_list_current.controller.search()
When using SQL, it is much better to use a prepared statement for this, because especially with dates, the syntax differs between databases and a prepared statement can be precompiled on the database server. Try this:
var query = 'select order_id from orders where order_date >= ?'
forms.frm_orders_current.controller.loadRecords(query, [application.getDateStamp()]);
The second parameter of loadRecords takes an array that needs to provide the values for the ? parameters. So if you do
SELECT abc FROM table WHERE def = ? AND hij = ? AND klm = ?