Hi Halojoy,
I tested the script starting with putting single quotes around the CarrierCode which then produced another error of the same type. I went through the script putting single quotes around each VAR when it displayed the error.
I now have no errors it has produced another problem.
The script is written to update multiple rows with different data in the table "flight_client".
It appears that only the last record is getting up in the "flight_client" table is getting updated.
I have tried:
do {
$updateSQL = "UPDATE flight_client SET ClientAirline='".$row_FlightData['CarrierCode']."', ClientFlightNo='".$row_FlightData['FlightNumber']."', ClientFlightSuffix='".$row_FlightData['FlightSuffix']."', ClientTerminalCode='".$row_FlightData['TerminalCode']."', ClientGateNumber='".$row_FlightData['GateNumber']."', ClientFlightStatus='".$row_FlightData['FlightStatus']."', ClientFlightId=".$row_FlightData['AODBUniqueID'].", ClientStime='".$row_FlightData['ScheduledDateTime']."', ClientEtime='".$row_FlightData['EstimatedDateTime']."', ClientDepartLoc='".$row_FlightData['IATALocationCode']."', ClientArriveLoc='".$row_FlightData['PublicLocationName']."', ClientZone='".$row_FlightData['zone']."' WHERE ClientFlightNoComplete ='". $row_FlightData['FlightNoComplete']."'";
} while ($row_FlightData = mysql_fetch_assoc($FlightData));
and
while ($row_FlightData = mysql_fetch_assoc($FlightData)){
$updateSQL = "UPDATE flight_client SET ClientAirline='".$row_FlightData['CarrierCode']."', ClientFlightNo='".$row_FlightData['FlightNumber']."', ClientFlightSuffix='".$row_FlightData['FlightSuffix']."', ClientTerminalCode='".$row_FlightData['TerminalCode']."', ClientGateNumber='".$row_FlightData['GateNumber']."', ClientFlightStatus='".$row_FlightData['FlightStatus']."', ClientFlightId=".$row_FlightData['AODBUniqueID'].", ClientStime='".$row_FlightData['ScheduledDateTime']."', ClientEtime='".$row_FlightData['EstimatedDateTime']."', ClientDepartLoc='".$row_FlightData['IATALocationCode']."', ClientArriveLoc='".$row_FlightData['PublicLocationName']."', ClientZone='".$row_FlightData['zone']."' WHERE ClientFlightNoComplete ='". $row_FlightData['FlightNoComplete']."'";
}
Any ideas as to why all the record in "flight_client" are not getting updated.
Hey, many thanks for your help with this.