[FX.php List] Problem Editing A Record (continued)

Matt Simpson matt.simpson at queensu.ca
Mon May 30 07:37:54 MDT 2005


Hello Again,
Thanks to Michael, Gjermund and Chris for the help attempt. Much  
appreciated. Those suggestions don't seem to be the cause of the  
problem unfortunately.

Just an example of the PHP code that I'm using:
<?php
$FXQuery = new FX(FILEMAKER_HOST, FILEMAKER_PORT, "FMPro7");
$FXQuery->FMPostQuery(false);
$FXQuery->FMUseCURL(FILEMAKER_CURL);
$FXQuery->SetDBData(FILEMAKER_NAME, FILEMAKER_LOUT, 1);
$FXQuery->SetDBPassword(FILEMAKER_PASS, FILEMAKER_USER);
$FXQuery->AddDBParam("-recid", $recordID);
$FXQuery->AddDBParam("Fname", "John");
$FXQuery->AddDBParam("Lname", "Doe");
$FXQuery->AddDBParam("to_courses_on_OPHRDCNum::CourseCode", "ACLS");
$FXQuery->AddDBParam("to_courses_on_OPHRDCNum::CourseYear", "2004");
$ReturnedData    = $FXQuery->FMEdit();
?>

What I'm wondering about now is that in the example, the firstname  
(FName) and lastname (Lname) records already exist in the  
"web_layout" which are being edited; however, the CourseCode and  
CourseYear are being added does that matter? Do I have to do  
something like:
<?php
$FXQuery = new FX(FILEMAKER_HOST, FILEMAKER_PORT, "FMPro7");
$FXQuery->FMPostQuery(false);
$FXQuery->FMUseCURL(FILEMAKER_CURL);
$FXQuery->SetDBData(FILEMAKER_NAME, FILEMAKER_LOUT, 1);
$FXQuery->SetDBPassword(FILEMAKER_PASS, FILEMAKER_USER);
$FXQuery->AddDBParam("-recid", $recordID);
$FXQuery->AddDBParam("Fname", "John");
$FXQuery->AddDBParam("Lname", "Doe");
$ReturnedData    = $FXQuery->FMEdit();
?>

And then:

<?php
$FXQuery = new FX(FILEMAKER_HOST, FILEMAKER_PORT, "FMPro7");
$FXQuery->FMPostQuery(false);
$FXQuery->FMUseCURL(FILEMAKER_CURL);
$FXQuery->SetDBData(FILEMAKER_NAME, FILEMAKER_LOUT, 1);
$FXQuery->SetDBPassword(FILEMAKER_PASS, FILEMAKER_USER);
$FXQuery->AddDBParam("-recid", $recordID);
$FXQuery->AddDBParam("to_courses_on_OPHRDCNum::CourseCode", "ACLS");
$FXQuery->AddDBParam("to_courses_on_OPHRDCNum::CourseYear", "2004");
$ReturnedData    = $FXQuery->FMCreate();
?>

This is so confusing! It worked last year but I think we were running  
FileMaker 6. Anyways, hopefully someone will know my issue from that  
code.

Regards,
Matt Simpson
Web Developer
MEdTech Unit - School of Medicine
82 Barrie Street 2nd Floor
Kingston Ontario
Canada, K7L 3N6

Phone: 613-533-6000 x78146
E-mail: matt.simpson at queensu.ca



More information about the FX.php_List mailing list