if ( ! $sql->isConnected () )
{
die ( $DatabaseError );
}
$layoutId = $cgi->getValue ( "id" );
//$rows = $sql->execute ( "SELECT * FROM " . $property_table . "
//
//WHERE id=" .
//$sql->quote ( $layoutId ) . " AND propertyshow=1 LIMIT 1",
//SQL_RETURN_ASSOC );
$rows = $sql->execute ( "SELECT
p.id AS id,
p.propertyprice AS propertyprice,
p.propertyaddress AS propertyaddress,
pl.propertylocation AS propertylocation,
pt.propertytype AS propertytype,
p.propertyref AS propertyref,
p.propertypieces AS propertypieces,
p.propertysurface AS propertysurface,
p.propertysituation AS propertysituation,
p.propertyexposition AS propertyexposition,
p.propertyannee AS propertyannee,
p.propertysurfaceterrain AS propertysurfaceterrain,
p.propertynatureterrain AS propertynatureterrain,
p.propertydependance AS propertydependance,
p.propertychauffage AS propertychauffage,
p.propertygeneral AS propertygeneral,
p.propertybedrooms AS propertybedrooms,
p.propertyphoto1 AS propertyphoto1,
p.propertyphoto2 AS propertyphoto2,
p.propertyphoto3 AS propertyphoto3,
p.propertyphoto4 AS propertyphoto4,
p.shortdescription AS shortdescription,
p.longdescription AS longdescription
FROM
" . $property_table . " p
INNER JOIN
" . $propertytypes_table . " pt ON (p.propertytype=pt.id)
INNER JOIN
" . $propertylocations_table . " pl ON (p.propertylocation=pl.id)
WHERE p.id=" .
$sql->quote ( $layoutId ) . " AND p.propertyshow=1 LIMIT 1",
SQL_RETURN_ASSOC )or die('requete =>'.$rows.'<br>
error->'.mysql_error());;
Partager