Forums: remove record after job is complete - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

remove record after job is complete Rate Topic: -----

#1 User is offline   stan 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 59
  • Joined: 17-October 13

Posted 14 May 2019 - 04:29 PM

Hello. I have table AdminJobs and 5 CustomView Tables:
id,
CompanyName,
ChauffeurName,
ChauffeurShortName,
`ChauffeurE-Mail`,
Job,
`Date`,
JobDay,
Misc,
PassengerName,
Extras,
MittingArea,
AddStop1,
AddStop2,
AddStop3,
AddStop4,
Cars,
PassengerQuantity,
Fare,
NoShow,
Confirmation,
AirportName,
AirportCode,
AirlineName,
AirlineCode,
AirlineCountry,
AirlineDoorNumber,
FlightNumber,
ArlineInfo,
AirlinePickUp,
AirportName1,
AirportCode1,
AirlineName1,
AirlineCode1,
AirlineCountry1,
FlightNumber1,
AirlineDoorNumber1,
ArlineInfoDo,
AirlineDropOff,
PortName,
PortCode,
CruiseLine,
CruiseLineCode,
ShipName,
Terminal,
PortPickUp,
PortName1,
PortCode1,
CruiseLine1,
CruiseLineCode1,
ShipName1,
Terminal1,
PortDropOff,
HotelName,
BuildingNumber,
StreetName,
City,
`State`,
ZipCode,
HotelPickup,
HotelName1,
BuildingNumber1,
StreetName1,
City1,
State1,
ZipCode1,
HotelDropOff,
RideDetails,
SpecialReguirments,
Quantity,
Name,
CurrentStatus,
`Time`,
CurrentStatus1,
Time1,
CurrentStatus2,
Time2,
CurrentStatus3,
Time3,
Hourly,
FareByHour,
WatingTime,
Picture,
`Express Line`,
Tolls,
Parking,
Comments,
Completed,
DateCompleted,
ForDate,
ForPassenger,
ForPickUp,
ForDropOff,
ForCar,
ForFlight,
ForStatus,
ForPassengers,
ForCurrency,
ForMisc,
ForExtras,
ForConfirmation,
ForRideDetails,
ForMitting
FROM AdminJobs
I need when my drivers completed job, remove from AdminJobs and move to table:JobsHistory..can you Please Help me. I try use code event after update:
$sql = "delete from AdminJobs where id_Job= ".$values['id_Job'];
CustomQuery($sql);


$sql = "INSERT INTO JobsHistory (id_Job, id_PassengerName,Date) values ($id_Job, ".$values['id_PassengerName'].",'".$Date."')";
CustomQuery($sql);
it's don't work.
0

#2 User is offline   mrl40 

  • Member
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 15-November 10

Posted 16 May 2019 - 11:00 PM

You may need to swop the statements around
You are trying to insert a record into a table from another table where it has already being deleted

Try inserting record first and then deleting it.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users