• Accueil
  • Actualités
  • Galerie
  • Calendrier du CARML
  • Contact

Page de test

Accueil Page de test
[insert_php]

echo « hello »;

try {
$db = new PDO(‘mysql:host=localhost;dbname=u914015582_tagui;charset=utf8’, ‘u914015582_tagui’, ‘15995123sN’);
$db->exec(« set names utf8 »);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(Exception $e) {
die(‘Erreur : ‘ . $e->getMessage());
}

echo « hello »;
$reponse = $db->query(« select ar.*,(select count(DISTINCT v.ip) from visites v where v.id_article = ar.ID) as nbr_visites , (select count(*) from commentaires co where ar.Id = co.id_article) as nbr_commentaire from articles ar ORDER BY ar.ID DESC LIMIT $debut , $nbarticlepage »);

while ($r= $reponse->fetch())
{
echo $r[‘TITRE’] }

[/insert_php]

© Copyright text goes here