I need to generate a new field value from fields read from a database. using a PHP function
Something like
So I assume that I should add the fields to retrieve box as an extra field like
That does not work. How should I do that short of looping through the records after the read in a separate function? What is that Special Fields box for? Is that a possibility?
Regards
Nick
Something like
badgetext= getBadgeDisplay($red, $green, $blue, $opacity)where the parameters are read from the database record.
So I assume that I should add the fields to retrieve box as an extra field like
mdlMasterYears.badgeText:getBadgeDisplay(red, green, blue, opacity)where red, green, blue, opacity are read fro m the database record.
That does not work. How should I do that short of looping through the records after the read in a separate function? What is that Special Fields box for? Is that a possibility?
Regards
Nick
Why not read the row you want from the database, and then process it in a PHP function to the value you want? Not going to be that computationally burdensome to just loop through the results.
This topic is locked and no more replies can be posted.