Hey hi,
Can any one help me out with this im getting query empty as error.
Can u plz tell me what is wrong in this code?
<?php
$con=mysql_connect("127.0.0.1","root","-------");
if(!$con)
{
die('Could not connect: '. mysql_error());
}
mysql_select_db("test",$con);
echo "<B>CUSTOMER RECEIPT</B>";
//$hotel_id= $_POST['33977'];
$sql = mysql_query("Select
h.hotel_name,h.room_price_per_nyt,r.end_date,r.start_date
FROM hotel_info h,reserve_hotel r
WHERE hotel_id=['33977']
AND h.hotel_id (+)= r.hotel_id") ;
echo "<table border='1'>
<tr>
<th>Name</th>
<th>Room_price_per_nyt</th>
<th>start_date</th>
<th>end_date</th>
</tr>";
$result = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
//printf("ID: %s <br> Name: %s <br> Rating: %s <br>
Room_price_per_nyt: %s <br>", $row[0], $row[1], $row[2], $row[3]);
echo "<tr>";
echo "<td>" . $row[0] . "</td>";
echo "<td>" . $row[1] . "</td>";
echo "<td>" . $row[2] . "</td>";
echo "<td>" . $row[3] . "</td>";
echo "</tr>";
}
echo"</table>";
if(!mysql_query($sql,$con))
{
die('Error:' . mysql_error());
}
mysql_close($con)
?>

