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...

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO guest_info ( check_in, check_out) VALUES ( %s, %s)",

                       GetSQLValueString($_POST['check_in'], "date"),
                       GetSQLValueString($_POST['check_out'], "date"));

thanks

in what format do you store your check_in & check_out data?

If its a timestamp you can make a comparison between them but if is like 1 Jan 2010 you might have some trouble making a comparison.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.