Jump to content

Kenny_Luck

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by Kenny_Luck

  1. thanks for your help once again
  2. So if i write SELECT RentID FROM rental WHERE NOTEXISTS (SELECT * FROM rental WHERE Dispatch <= "2019/10/8" AND Dropoff >= "2019/10/2" ) i cant made it to display the data i wanted , when i put in to the mysql to check for error it poped out something like this at the above , i need help
  3. ok i solved the problem , but now there is another problem which i filtered and displayed the data that i don't one with SELECT * FROM rental WHERE Dispatch <= '2019/10/08' AND Dropoff >= '2019/10/02' , but now how do i filter the data that i wanted
  4. but if i added space in between Not and Exists , it became 3 errors were found during analysis. Unrecognized keyword. (near "NOT" at position 32) Unrecognized keyword. (near "EXISTS" at position 36) Unexpected token. (near "(" at position 42)
  5. SELECT RentID FROM rental WHERE NOTEXISTS(SELECT plateNum FROM rental WHERE Dispatch >= '2019/10/8' AND Dropoff <= '2019/10/5' ) SELECT RentID FROM rental WHERE NOTEXISTS(SELECT plateNum FROM rental WHERE Dispatch >= "2019/10/8" AND Dropoff <= "2019/10/2" ) LIMIT 0, 25 #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT plateNum FROM rental WHERE Dispatch >= '2019/10/8' AND Dropoff <= '2019/1' at line 1
  6. so here the code that i am confusing the whole month , how can i get it to print out the filtered data $sql="SELECT COUNT(*) as conflicts FROM rental WHERE Dispatch < :dropoff AND Dropoff > :dispatch"; $stmt = $pdo->prepare($sql); $stmt->execute( [ 'dropoff' => $Dropoff, 'dispatch' => $Dispatch ]); im so frustrated on myself that cant do anything
×
×
  • 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.