[FX.php List] Re: [FX.php_List] Problem displaying results of FMEdit() with over 40 vars

David Cox davidcox at wcfs.edu
Thu Apr 2 14:51:47 MDT 2009


I've got a problem I've been banging my head against all week.

I've got an FMEdit() which displays the results fine with only about 10
returned vars.  However, when I try to return over 40 vars from the same
layout (which updated in FileMaker fine), the data does not display for the
all the vars.  I can see the updated data in the FileMaker db, but it does
not display in the returned result.

Is there some sort of limit on how many vars I can return and display after
an FMEdit() function?  Everything worked fine before I tried to go for the
full record.  I've checked all my $data vars in the html to make sure they
are echoed out in the html output and they are fine.

Here is the code that is haunting me. (specifically the foreach section in
second half)

require_once('FX/fx.php');
$edit_request = new FX($serverIPAddress, $port, $connection);
$edit_request->SetDBData('fmdb.fp7', editlayout');
$edit_request->SetDBUserPass($username, $password);
$edit_request->AddDBParam ('-recid', $RecID);
$edit_request->AddDBParam('coursetitle1', $_REQUEST['coursetitle1']);
$edit_request->AddDBParam('coursetitle2', $_REQUEST['coursetitle2']);
$edit_request->AddDBParam('coursetitle3', $_REQUEST['coursetitle3']);
$edit_request->AddDBParam('coursetitle4', $_REQUEST['coursetitle4']);
$edit_request->AddDBParam('coursetitle5', $_REQUEST['coursetitle5']);
$edit_request->AddDBParam('coursetitle6', $_REQUEST['coursetitle6']);
$edit_request->AddDBParam('coursetitle7', $_REQUEST['coursetitle7']);
$edit_request->AddDBParam('coursetitle8', $_REQUEST['coursetitle8']);
$edit_request->AddDBParam('coursetitle9', $_REQUEST['coursetitle9']);
$edit_request->AddDBParam('coursetitle10', $_REQUEST['coursetitle10']);
$edit_request->AddDBParam('coursetype1', $_REQUEST['coursetype1']);
$edit_request->AddDBParam('coursetype2', $_REQUEST['coursetype2']);
$edit_request->AddDBParam('coursetype3', $_REQUEST['coursetype3']);
$edit_request->AddDBParam('coursetype4', $_REQUEST['coursetype4']);
$edit_request->AddDBParam('coursetype5', $_REQUEST['coursetype5']);
$edit_request->AddDBParam('coursetype6', $_REQUEST['coursetype6']);
$edit_request->AddDBParam('coursetype7', $_REQUEST['coursetype7']);
$edit_request->AddDBParam('coursetype8', $_REQUEST['coursetype8']);
$edit_request->AddDBParam('coursetype9', $_REQUEST['coursetype9']);
$edit_request->AddDBParam('coursetype10', $_REQUEST['coursetype10']);
$edit_request->AddDBParam('data1', $_REQUEST['data1']);
$edit_request->AddDBParam('data2', $_REQUEST['data2']);
$edit_request->AddDBParam('data3', $_REQUEST['data3']);
$edit_request->AddDBParam('data4', $_REQUEST['data4']);
$edit_request->AddDBParam('data5', $_REQUEST['data5']);
$edit_request->AddDBParam('data6', $_REQUEST['data6']);
$edit_request->AddDBParam('data7', $_REQUEST['data7']);
$edit_request->AddDBParam('data8', $_REQUEST['data8']);
$edit_request->AddDBParam('data9', $_REQUEST['data9']);
$edit_request->AddDBParam('data10', $_REQUEST['data10']);
$edit_request->AddDBParam('data11', $_REQUEST['data11']);
$edit_request->AddDBParam('data12', $_REQUEST['data12']);
$edit_request->AddDBParam('data13', $_REQUEST['data13']);
$edit_request->AddDBParam('data14', $_REQUEST['data14']);
$edit_request->AddDBParam('data15', $_REQUEST['data15']);
$edit_request->AddDBParam('data16', $_REQUEST['data16']);
$edit_request->AddDBParam('data17', $_REQUEST['data17']);
$edit_request->AddDBParam('data18', $_REQUEST['data18']);
$edit_request->AddDBParam('data19', $_REQUEST['data19']);
$edit_request->AddDBParam('data20', $_REQUEST['data20']);
$edit_request->AddDBParam('data21', $_REQUEST['data21']);
$edit_request->AddDBParam('data22', $_REQUEST['data22']);
$edit_request->AddDBParam('data23', $_REQUEST['data23']);
$edit_request->AddDBParam('data24', $_REQUEST['data24']);
$edit_request->AddDBParam('data25', $_REQUEST['data25']);
$edit_request->AddDBParam('data26', $_REQUEST['data26']);
$edit_request->AddDBParam('data27', $_REQUEST['data27']);
$edit_request->AddDBParam('data28', $_REQUEST['data28']);
$edit_request->AddDBParam('data29', $_REQUEST['data29']);
$edit_request->AddDBParam('data30', $_REQUEST['data30']);
$edit_request->AddDBParam('data31', $_REQUEST['data31']);
$edit_request->AddDBParam('data32', $_REQUEST['data32']);
$edit_request->AddDBParam('data33', $_REQUEST['data33']);
$edit_request->AddDBParam('data34', $_REQUEST['data34']);
$edit_request->AddDBParam('data35', $_REQUEST['data35']);
$edit_request->AddDBParam('data36', $_REQUEST['data36']);
$edit_request->AddDBParam('data37', $_REQUEST['data37']);
$edit_request->AddDBParam('data38', $_REQUEST['data38']);
$edit_request->AddDBParam('data39', $_REQUEST['data39']);
$edit_request->AddDBParam('data40', $_REQUEST['data40']);
$edit_request->AddDBParam('data41', $_REQUEST['data41']);
$edit_request->AddDBParam('data42', $_REQUEST['data42']);
$result = $edit_request->FMEdit();
$records = $result['data'];

        //extracts user data from  FMEdit result array to vars
        // this step is actually pulling data from the defined database
relationship::fields

        foreach ($records as $record){
            $StudentName=$record['StudentName'][0];
            $StudentLastName=$record['StudentLastName'][0];
             $coursetitle1=$record['coursetitle1'][0];
            $coursetitle1 = (!empty($coursetitle1)) ? $coursetitle1 :
"Suggest:Bible";
            $coursetitle2=$record['coursetitle2'][0];
            $coursetitle2 = (!empty($coursetitle2)) ? $coursetitle2 :
"Suggest:English Grammar";
            $coursetitle3=$record['coursetitle3'][0];
            $coursetitle3 = (!empty($coursetitle3)) ? $coursetitle3 :
"Suggest:English Literature";
            $coursetitle4=$record['coursetitle4'][0];
            $coursetitle4 = (!empty($coursetitle4)) ? $coursetitle4 :
"Suggest:Math";
            $coursetitle5=$record['coursetitle5'][0];
            $coursetitle5 = (!empty($coursetitle5)) ? $coursetitle5 :
"Suggest:Science";
            $coursetitle6=$record['coursetitle6'][0];
            $coursetitle6 = (!empty($coursetitle6)) ? $coursetitle6 :
"Suggest:Social Studies";
            $coursetitle7=$record['coursetitle7'][0];
            $coursetitle7 = (!empty($coursetitle7)) ? $coursetitle7 :
"Suggest:History";
            $coursetitle8=$record['coursetitle8'][0];
            $coursetitle8 = (!empty($coursetitle8)) ? $coursetitle8 :
"Suggest:Foreign Language";
            $coursetitle9=$record['coursetitle9'][0];
            $coursetitle9 = (!empty($coursetitle9)) ? $coursetitle9 : "";
            $coursetitle10=$record['coursetitle10'][0];
            $coursetitle10 = (!empty($coursetitle10)) ? $coursetitle10 : "";
            $coursetype1=$record['coursetype1'][0];
            $coursetype2=$record['coursetype2'][0];
            $coursetype3=$record['coursetype3'][0];
            $coursetype4=$record['coursetype4'][0];
            $coursetype5=$record['coursetype5'][0];
            $coursetype6=$record['coursetype6'][0];
            $coursetype7=$record['coursetype7'][0];
            $coursetype8=$record['coursetype8'][0];
            $coursetype9=$record['coursetype9'][0];
            $coursetype10=$record['coursetype10'][0];
            $data1=$record['data1'][0];
            $data2=$record['data2'][0];
            $data3=$record['data3'][0];
            $data4=$record['data4'][0];
            $data5=$record['data5'][0];
            $data6=$record['data6'][0];
            $data7=$record['data7'][0];
            $data8=$record['data8'][0];
            $data9=$record['data9'][0];
            $data10=$record['data10'][0];
            $data11=$record['data11'][0];
            $data12=$record['data12'][0];
            $data13=$record['data13'][0];
            $data14=$record['data14'][0];
            $data15=$record['data15'][0];
            $data16=$record['data16'][0];
            $data17=$record['data17'][0];
            $data18=$record['data18'][0];
            $data19=$record['data19'][0];
            $data20=$record['data20'][0];
            $data21=$record['data21'][0];
            $data22=$record['data22'][0];
            $data23=$record['data23'][0];
            $data24=$record['data24'][0];
            $data25=$record['data25'][0];
            $data26=$record['data26'][0];
            $data27=$record['data27'][0];
            $data28=$record['data28'][0];
            $data29=$record['data29'][0];
            $data30=$record['data30'][0];
            $data31=$record['data31'][0];
            $data32=$record['data32'][0];
            $data33=$record['data33'][0];
            $data34=$record['data34'][0];
            $data35=$record['data35'][0];
            $data36=$record['data36'][0];
            $data37=$record['data37'][0];
            $data38=$record['data38'][0];
            $data39=$record['data39'][0];
            $data40=$record['data40'][0];
            $data41=$record['data41'][0];
            $data42=$record['data42'][0];



Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20090402/27c10d1d/attachment-0001.html


More information about the FX.php_List mailing list