Hello everyone,
I have been toying around with this for a while, and I am a bit confused.
I need to get my propertyID from a table called 'listings'. I have been using this for testing purpose:
$propertyID = array("8731","4564");
but now I need to get those ID from my table, 'listings'.
Here is part of the code.
$propertyID = array("8731","4564"); // need to get those IDs from my DB.
foreach($propertyID as $ID)
{
$query = "SELECT * FROM calendar WHERE date BETWEEN '$start' AND '$end' AND propertyID=$ID";
$result = mysql_query($query) or die(mysql_error());
$numrows = mysql_num_rows($result);
if($numrows == 0)
{
echo 'print '.$ID; //prints if property is available
}
}
Thanks for your help everyone.