but when i use php
with this code i keep getting "array" and i don't know what that means.. :crying:
<?php
$username = "root";
$password = "";
$host = "localhost";
$database = "h_reservation";
$connection = @mysql_connect($host, $username, $password) or die("Can not connect to database: ".mysql_error());
$db = @mysql_select_db($database) or die("Can not select the database: ".mysql_error());
$query = mysql_query("select count('guest_id') from guest_info where room_type = 'double room' and
check_in >= '2010-02-11'");
$row = mysql_fetch_array($query);
echo $row;
?>
and if i do this it says " Resource id #4 "
$sql = "select count('guest_id') from guest_info where room_type = 'double room' and
check_in >= '2010-02-11'";
$row = mysql_query($sql);
echo $row;
and if i do this.... this just prints the guest id number..
$sql= mysql_query("SELECT * FROM guest_info where room_type = 'double room' and
check_in >= '2010-02-11'");
while($row = mysql_fetch_array($sql)){
echo $row['guest_id'] . "<br>";}
can someone help me how to count im kinda new to this stuff -.-
thank so much:love:
Edited by hardinera, 07 March 2010 - 07:46 PM.
-


Sign In
Create Account


Back to top









