Welcome Guest, Not a member yet? Register   Sign In
How do I add this function to my codeigniter application

We have a small form php application using codeIgniter, that feeds data into a larger application/database. The larger database is an oracle db, so the 'date' that is sent has to be in oracle format (we are getting a parse error when the date is sent to the field in the oracle db.)

The smaller form application is written in CodeIgniter which I am just learning.

I think I have found the section of code [see very bottom of this post for the code]that bundles the data up in the smaller app and sends it to the large oracle database.

What I think I understand this code is doing is:>> checks and counts the fields that are assigned to a field in the larger oracle db, then checks to see if it is a checkbox, radio button, dropdown, etc, if so, separates the values and sends them to the oracle db.

I want to add a check to see if one of the fields being sent is a "DATE" field [we are using a jquery plug in, so the date appears in the application as 01/01/10] and if so, change the value in that field to an Oracle formatted date [01-Jan-10] and then send it - so I would like something like this>> [if ($fldType = FIELD_DATE_FIELD){get_oracle_date($value);}] [the oracle date conversion function is already in place).

How do I add this to the above code???? Thanks in advance.


if(count($AcctMgFlds) > 0)
foreach($AcctMgFlds as $fld)
$fldVal = "";
//Get Option Text from multi option fields like checkbox, dropdown etc.
if($fld->getOptionsFromAppFlag() != FIELD_OPTIONS_FROM_App && ($fld->getFieldTypeId() == FIELD_CHECK_BOX || $fld->getFieldTypeId() == FIELD_MULTI_SELECT || $fld->getFieldTypeId() == FIELD_DROP_DOWN || $fld->getFldTypeId() == FIELD_RADIO))
$fldVal = $fldMgr->getOptionDisplayText($fld->getId(), str_replace("'","''",$req->getFldVal($fld->getId())));
$fldVal = str_replace("'","''",$req->getFldVal($fld->getId()));
$TR[$field->getTRMapIdentifier()] = $fldVal;

Theme © iAndrew 2016 - Forum software by © MyBB