[FX.php List] in_array code fragment
David Ness
dness at bondedbuilders.com
Fri Sep 15 09:30:47 MDT 2006
Here's that code fragment again, with the formatting fixed (hopefully)
for clarity.
// Read in all values contained in the referenceNumber field from FM
// Layout 'referenceNumberLayout' contains 2 fields:
// 'customer_number' & 'referenceNumber'
$Query = new FX($serverIP,$webCompanionPort);
$Query->SetDBData($databasename,'referenceNumberLayout', 'all');
$Query->SetDBPassword($password,$username);
$Query->AddDBParam('customer_number', $customerNumber, "eq" );
$referenceNumber_array = $Query->FMFind();
while (($importdata = fgetcsv($handle, 0, ",")) != FALSE) {
// Check to see if Builder Ref#/Job# is unique for this builder.
// This is the mechanism for handling (excluding) duplicate
submissions.
// $importdata[0] contains the reference number
if( in_array( $importdata[0],
$referenceNumber_array['referenceNumber'] )) {
$validationMsg = 'Skipped';
}
}
--
David Ness,
Database Systems Programmer
More information about the FX.php_List
mailing list