Jump to content

Between dates

- - - - -

  • Please log in to reply
No replies to this topic

#1
hardinera

hardinera

    Learning Programmer

  • Members
  • PipPipPip
  • 42 posts
how can i give values in between the start and end date?
start is from field check_in
and end is from check_out
because when i query between check in and check out the value = 0

like if i do this .. the save date is for example customer 1 : check in : Jan 2 and check out: Jan 5

when i query between jan 1 and jan 10 it will return a value but when i query jan 3-4 and is suppose to have a value because customer is checked from 2-5 it does`not return any...

this is my code..for my query in between for search.

$select = mysql_query("SELECT * FROM guest_info 
                      where room_type = '$mode' 
                      and check_in >= ('$check_in') 
                      and check_out <=('$check_out'); 


thanks




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users