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 35
| <?php
require_once 'jqSuitePHP/jq-config.php';
$message="";
try
{
$dbh =new PDO(DB_DSN,DB_USER,DB_PASSWORD);
}
catch (PDOException $e)
{
$message= $e->getMessage();
}
if (trim($message)=="") {
$sql = "SELECT _choix.critere_cleunik,_choix.choix_cleunik,_choix.choix_code,_choix.choix_valeur_texte_01,_choix.choix_valeur_texte_02,case _choix.choix_actif WHEN 1 THEN 'YES' ELSE 'NO' END AS choix_actif,_choix.choix_portee ,(select count(*) from _act_interlo where _act_interlo.choix_cleunik=_choix.choix_cleunik) as nombre FROM _choix WHERE _choix.critere_cleunik =86";
$req = $dbh->query($sql);
if($req->rowCount() == 0)
$message= 'Aucune donnée ...';
else{
while($dat = $req->fetch(PDO::FETCH_ASSOC))
$message.= $dat['choix_cleunik'].' - '.$dat['choix_valeur_texte_01'].' - '.$dat['nombre'].'<br />';
}
}
?>
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8" />
<meta name="description" content="Tests" />
<meta name="author" content="Christophe Charron" />
<link rel="shortcut icon" href="/favicon.ico" />
<title>Tests</title>
</head>
<body>
<?php echo $message; ?>
</body>
</html> |
Partager