[FX.php List] FileMaker error 5 - 'command is invalid'

Chris Bisgard chris at hotanvil.com
Tue Feb 19 17:26:39 MST 2008


Hi all,

I must be missing something really obvious here. Can anyone see why
the FX query below would generate error code 5 (command is invalid)?
I've opened up the account priveleges for the database username to
full access, made sure none of the fields involved have any special
validation required, and I still get the error.

By the way, I'm aware that it's very, very bad practice to push POST
data directly into a database, but I haven't yet added my functions
for validating user input, since I've been spending all day tracking
down this one error.

My code to follow...

Thanks for any help,
Chris Bisgard


$query=new FX($serverIP,$webCompanionPort);
$query->setDBData('CountyApps','WCAHHC');
$query->SetDBPassword($dbPass,$dbUser);
$query->AddDBParam('-recID',$_POST['recID']);
$query->AddDBParam('OrgName',$_POST['OrgName']);
$query->AddDBParam('AltContactName',$_POST['AltContactName']);
$query->AddDBParam('AltContactEmail',$_POST['AltContactEmail']);
$query->AddDBParam('DateEstablished',$_POST['DateEstablished']);
$query->AddDBParam('Address1',$_POST['Address1']);
$query->AddDBParam('Address2',$_POST['Address2']);
$query->AddDBParam('City',$_POST['City']);
$query->AddDBParam('State',$_POST['State']);
$query->AddDBParam('Zip',$_POST['Zip']);
$query->AddDBParam('County',$_POST['County']);
$query->AddDBParam('TaxID',$_POST['TaxID']);
$query->AddDBParam('WebSite',$_POST['WebSite']);
$query->AddDBParam('Phone',$_POST['Phone']);
$query->AddDBParam('FAX',$_POST['FAX']);
$query->AddDBParam('Email',$_POST['Email']);
$query->AddDBParam('NonProfitStatus',$_POST['NonProfitStatus']);
$query->AddDBParam('Date501',$_POST['Date501']);
$query->AddDBParam('Staff',$_POST['Staff']);
$query->AddDBParam('Volunteers',$_POST['Volunteers']);
$query->AddDBParam('AltContactName',$_POST['AltContactName']);
$query->AddDBParam('AltContactEmail',$_POST['AltContactEmail']);
$query->AddDBParam('WCLevel',$_POST['WCLevel']);
$query->AddDBParam('WCHx',$_POST['WCHx']);
$query->AddDBParam('WCFRHx',$_POST['WCFRHx']);
$query->AddDBParam('WCFRHxExplain',$_POST['WCFRHxExplain']);
$result=$query->FMEdit();


More information about the FX.php_List mailing list