function gethotproperty($hot){
$gethot = "select p.reference_id, p.area, p.area_unit, p.transaction_type,p.property_type,p.property_name,p.address1,p.address2,p.city,p.locality,p.pincode,p.area_in_sqft,p.total_price,p.negotiable,".
"p.rate_per_sqft,p.num_bedrooms,p.floor_number,p.intro_image_loc,p.amenities_detail, p.specification_detail, p.location_detail from " . DBConf::getDatabaseSchema() . "property p where p.hot = ".$hot;
$result = mysql_query($gethot, $this->connection);
$property = new Property();
while($row = mysql_fetch_array($result)){
$property->referenceId = $row['reference_id'];
$property->transactionType = $row['transaction_type'];
$property->propertyType = $row['property_type'];
$property->propertyName = $row['property_name'];
$property->address1 = $row['address1'];
$property->address2 = $row['address2'];
$property->city = $row['city'];
$property->locality = $row['locality'];
$property->pinCode = $row['pincode'];
$property->areaInSqFt = $row['area_in_sqft'];
$property->area = $row['area'];
$property->areaUnit = $row['area_unit'];
$property->totalPrice = $row['total_price'];
$property->isNegotiable = $row['negotiable'];
$property->ratePerSqFt = $row['rate_per_sqft'];
$property->numberOfBedrooms = $row['num_bedrooms'];
$property->floorNumber = $row['floor_number'];
$property->amenities = $row['amenities_detail'];
$property->introImageLocation = $row['intro_image_loc'];
$property->specificationDetails = $row['specification_detail'];
$property->locationDetails = $row['location_detail'];
}
return $property;
}
what is wrong with this script.keep getting an error:
mysql_fetch_array(): supplied argument is not a valid MySQL result resource.