Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Framework » getData_serial ($where)
getData_serial ($where) [message #7607] Fri, 16 July 2021 09:08 Go to next message
htManager is currently offline  htManager
Messages: 415
Registered: May 2014
Senior Member
Hi Toni,
I have a list view report and I want to order the records alphabetical. In the _cm_post_fetchRow($fieldarray) method I get all the records in a different order.
In functions-and-variables.html I read that the getData_serial($where) methods gets all the records from the database. Afterwards they will be passed to the _cm_post_fetchRow() method one after the other.
In which _cm_... method can I see or change the order of the records or call the getData_serial($where) method?
Re: getData_serial ($where) [message #7608 is a reply to message #7607] Sat, 17 July 2021 04:31 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
You must set $this->sql_orderby BEFORE the call to getData_serial, which will merely issue the SELECT query *without* returning any data, just a resource. Calls to $this->fetchRow() will then return one record at a time from that resource.

Re: getData_serial ($where) [message #7609 is a reply to message #7608] Sun, 18 July 2021 07:10 Go to previous message
htManager is currently offline  htManager
Messages: 415
Registered: May 2014
Senior Member
Thank you. I placed the code in _cm_pre_getData() and everything works fine now.
Previous Topic: Drop Down - PDF Output
Next Topic: SQL with concat() - cannot extract token from
Goto Forum:
  


Current Time: Fri Mar 29 07:54:27 EDT 2024

Total time taken to generate the page: 0.01035 seconds