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

Home » RADICORE development » Bug Reports » getData_raw is calling post data processing (Function is not behaving as per the documentation)
getData_raw is calling post data processing [message #7922] Sat, 27 September 2025 10:49 Go to next message
gpatti is currently offline  gpatti
Messages: 287
Registered: August 2008
Senior Member
After a long break I am upgrading my RADICORE system to the latest version as my old config is going EOL.

I have come across a problem where my code no longer works in the latest radicore version and after debugging I have found that when I call getData_raw from within _cm_post_getData() I end up in a loop inside _cm_post_getData().
The debugger shows a reference to $control_flags['rdc_no_post_getdata'] in std.table.class.inc which is not set so the code continually loops on line 4476 into custom_post_getdata rather than skipping.

Is this a bug, or is there somewhere that I now need to set the rdc_no_post_getdata control flag? I couldn't find anything is the documentation about it.

Many thanks,

Graham
Re: getData_raw is calling post data processing [message #7923 is a reply to message #7922] Tue, 30 September 2025 06:16 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2384
Registered: April 2006
Location: Surrey, UK
Senior Member
My apologies. I have updated the documentation.

Re: getData_raw is calling post data processing [message #7924 is a reply to message #7923] Tue, 30 September 2025 11:42 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 287
Registered: August 2008
Senior Member
Thanks Tony.

How do I set this flag if I want to call getData_raw() without any post processing?
Re: getData_raw is calling post data processing [message #7925 is a reply to message #7924] Wed, 01 October 2025 05:22 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2384
Registered: April 2006
Location: Surrey, UK
Senior Member
Simply add "rdc_no_post_getdata=true" to the WHERE string. This will be extracted into the $control_flags variable in line 4412 of the getData_raw() method, and then acted upon in line 4493.

Re: getData_raw is calling post data processing [message #7926 is a reply to message #7925] Wed, 01 October 2025 06:31 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 287
Registered: August 2008
Senior Member
That hasn't worked for me Tony. My code is

                // If the number of rows retrieved is more than the maximum sequence number then don't display some of the output task buttons
                $exammax =& RDCsingleton::getInstance('exam');
                $exammax->sql_select = "MAX(exam_seq_nbr) as maxseq";
                $exammax->sql_where = "rdc_no_post_getdata=true";
                $max_seq = $exammax->getData_raw($where);
and this has generated the following error:

Fatal Error: MySQL: Unknown column 'rdc_no_post_getdata' in 'where clause' (# 1054)
SQL query: SELECT MAX(exam_seq_nbr) as maxseq FROM exam WHERE rdcaccount_id='6' AND session_id='37' AND rdc_no_post_getdata=true
Error in line 1046 of file '/var/www/medaltest.com/includes/dml.mysqli.class.inc'.

I'll step through with my debugger and see if I can find out what happened.

However, I noted that the line numbers you quoted don't seem to match with what I'm seeing in std.table.class.inc. The header in that file is dated 14/11/24 and says revision 52.
Re: getData_raw is calling post data processing [message #7927 is a reply to message #7926] Wed, 01 October 2025 07:21 Go to previous message
gpatti is currently offline  gpatti
Messages: 287
Registered: August 2008
Senior Member
Ah, I see now that I need to append the control flag to $where itself, and not object->sql_where

It works now that I've corrected that.

Maybe an example in the documentation might be useful for others as these control flags aren't documented.

Thanks for your help Tony
Previous Topic: File classes/mnu_chart.class.inc is missing
Goto Forum:
  


Current Time: Wed Oct 01 08:43:46 EDT 2025

Total time taken to generate the page: 0.01084 seconds