par
albat » 07 nov. 2008, 11:01
D'où sort ton
$id_prospect ?
À part ce détail, une solution à ta recherche est celle-ci :
$id = isset($_GET['id_prospect']) ? : $_GET['id_prospect'] : 0 ;
$sql = "SELECT champ1, champ2 FROM client ".($id>0 ? "WHERE id=".$id : "ORDER BY id");
D'où sort ton [b]$id_prospect[/b] ?
À part ce détail, une solution à ta recherche est celle-ci :
[php]$id = isset($_GET['id_prospect']) ? : $_GET['id_prospect'] : 0 ;
$sql = "SELECT champ1, champ2 FROM client ".($id>0 ? "WHERE id=".$id : "ORDER BY id");[/php]