I have code like this, it shows data when tehre is data but if there is no data i want to say "no records"
where am i going wrong?
<?php
require_once('db_conf.php');
$sql = "SELECT * FROM tbl_holidayspecials WHERE fld_country = '$countryname' AND fld_state = '$statename' AND fld_city = '$cityname'";
$result = mysql_query($sql);
if (!$result) {
echo "No Records";
}
while ($row = mysql_fetch_assoc($result)) {
$ids = $row["id"];
$hotelname = $row["fld_destination"];
echo $hotelname;
}