hardinera
03-08-2010, 06:07 AM
//DISPLAYING CONTENT!!
echo "----------display content <br>";
$select = mysql_query("SELECT * FROM guest_info where room_type = 'single room' and
check_in >= '0000-00-00'");
while($row = mysql_fetch_array($select)){
echo $row['guest_id'] . "<br>" . "<br>";
}
//COUNTING CONTENT
echo "----------counting <br>";
$total_results = mysql_query("SELECT count('guest_id') FROM guest_info where room_type = 'single room' and check_in >= '0000-00-00'");
$row = mysql_fetch_array($total_results);
$result = count($row);
echo $result;
here is my code.. the displaying part is doing fine.. but its not counting
anybody can help me? thanks:p
echo "----------display content <br>";
$select = mysql_query("SELECT * FROM guest_info where room_type = 'single room' and
check_in >= '0000-00-00'");
while($row = mysql_fetch_array($select)){
echo $row['guest_id'] . "<br>" . "<br>";
}
//COUNTING CONTENT
echo "----------counting <br>";
$total_results = mysql_query("SELECT count('guest_id') FROM guest_info where room_type = 'single room' and check_in >= '0000-00-00'");
$row = mysql_fetch_array($total_results);
$result = count($row);
echo $result;
here is my code.. the displaying part is doing fine.. but its not counting
anybody can help me? thanks:p