Jump to content

Kenny_Luck

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Kenny_Luck

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I now had mostly figure out and able to run it and use it , thank you for all your help specially Barand thanks
  2. if i change if($sql == 0) is still the same the value wont come out
  3. So this mean that this code is completely useless and i cant get the Conflicts value at all
  4. I using mysqli , the code that i posted is the one i write , so you are basically saying that my query for is not run right
  5. Im just learning the double prevention which im going to do for my assignment
  6. i dont quiet understand what you are trying to say
  7. $sql="SELECT COUNT(*) as conflicts FROM rental WHERE plateNum = $plateNum AND Dispatch > $Dropoff AND Dropoff > $Dispatch"; if("0"){ $sql="INSERT INTO rental (Rentdate,Dispatch,Dropoff,Dis_TIME,Drop_TIME,Ins,Tcost,PDcost,plateNum,userID)VALUES(CURDATE(),'$Dispatch','$Dropoff','$Dis_TIME','$Drop_TIME','$Ins','$Tcost','$PDcost','$plateNum','$userID')"; $result=$conn->query($sql); }else{ echo"Fail";} how do I get the value of the conflicts im now very clueless
  8. i see thanks , if i got any problem i will ask it , thanks for your help
  9. so if i wan to like rent the car starting with 11/8/2018 is still possible right ??
  10. I am facing a problem with double booking , i don't know where to start to write the code that a customer can't rental the same car at for the same day. For example, if a customer choose to book car A from 1/8/2018 till 10/8/2018 , how do i avoid that other customer won't book on the date 1/8/2018 or even 2/8/2018 and so on. Pls help me is quiet urgent
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.