1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| $savano = $bdd->prepare('
SELECT
C.idanonc
FROM
sav_annonce C
WHERE user = :log
INNER JOIN (
SELECT
id,
user,
region,
categorie,
sous_categorie,
titre_astuce,
descrip1,
photo,
DATE_FORMAT(dateanonc, "le %d/%m/%Y") AS dateano,
opturgent,
nbclic,
nbcoment,
tovote
FROM annonce
WHERE actif = 1
) N
ON C.idanonc = N.id
ORDER BY
N.dateanonc desc $limit
');
$savano->execute(array(
'log' => $log
));
if ( $elements = $savano->fetchAll())
{
$nbmsg = $elements->rowCount(); |
Partager