sofi81
Messages postés2Date d'inscriptionmercredi 13 juin 2007StatutMembreDernière intervention13 juin 2007
-
13 juin 2007 à 17:11
coucou747
Messages postés12303Date d'inscriptionmardi 10 février 2004StatutMembreDernière intervention30 juillet 2012
-
13 juin 2007 à 17:40
salt a tous;
voila j'ai cree un formulaire ou je dois cocher soit des cases ou selectionner des boutons radios; apres je dois afficher tous ce que jai selectionner sous forme de liste mais le probleme c'est qu'il me ramene rien voila !!!!
voila mon bout de code
$sql = "select count(*) as num_appt from appartement where wilaya='$wilaya' and date>='$deb' and date<='$dfin' and type_transaction='$trans' in ('$chox1','$chox2','$chox3')";
}
else
if($type_client=="particulier")
{
$sql = "select count(*) as num_appt from appartement where wilaya='$wilaya' and type_client='$type_client' and date>='$deb' and date<='$dfin' and type_transaction='$trans' in ('$chox1','$chox2','$chox3')";
}
else
if($type_client=="agence")
{
$sql = "select count(*) as num_appt from appartement where type_client='$type_client' and num_client='$agence' and wilaya='$wilaya' and type_transaction='$trans' and date>='$deb' and date<='$dfin' and type_transaction='$trans' in ('$chox1','$chox2','$chox3','$chox4','$chox5') ";
}
$p = @mysql_query($sql);
$fin = @mysql_result($p,"0","num_appt");
}
}
// Déclaration de la variable début
$debut = ($page - 1) * $nb_rep_pages;
if($type_client=="tous")
{
//la requète de selection des messages
$req = mysql_query("SELECT * from appartement where wilaya='$wilaya' and date>='$deb' and date<='$dfin' and type_transaction='$trans' in ('$chox1','$chox2','$chox3') ORDER BY date DESC LIMIT $debut,$nb_rep_pages ") or die ("erreur requete");
}
else
if($type_client=="particulier")
{
$req = mysql_query("SELECT * from appartement where wilaya='$wilaya' and date>='$deb' and date<='$dfin' and type_client='particulier' and type_transaction='$trans' in ('$chox1','$chox2','$chox3') ORDER BY date DESC LIMIT $debut,$nb_rep_pages ") or die ("erreur requete");
}
else
if($type_client=="agence")
{
$req = mysql_query("SELECT * from appartement where wilaya='$wilaya' and date>='$deb' and date<='$dfin' and type_client='agence' and num_client='$agence' and type_transaction='$trans' in ('$chox1','$chox2','$chox3') ORDER BY date DESC LIMIT $debut,$nb_rep_pages ") or die ("erreur requete");
}
// Ici on calcul le nombre de page
$nbpages = ceil($fin / $nb_rep_pages); // Ici on arrondi
$sql = "select count(*) as num_appt from appartement where wilaya='$wilaya' and date>='$deb' and date<='$dfin' and type_transaction='$trans' in ('$chox1','$chox2','$chox3')";
}
else
if($type_client=="particulier")
{
$sql = "select count(*) as num_appt from appartement where wilaya='$wilaya' and type_client='$type_client' and date>='$deb' and date<='$dfin' and type_transaction='$trans' in ('$chox1','$chox2','$chox3')";
}
else
if($type_client=="agence")
{
$sql = "select count(*) as num_appt from appartement where type_client='$type_client' and num_client='$agence' and wilaya='$wilaya' and type_transaction='$trans' and date>='$deb' and date<='$dfin' and type_transaction='$trans' in ('$chox1','$chox2','$chox3','$chox4','$chox5') ";
}
$p = mysql_query($sql);
$fin = mysql_result($p,"0","num_appt");
}
}
// Déclaration de la variable début
$debut = ($page - 1) * $nb_rep_pages;
if($type_client=="tous")
{
//la requète de selection des messages
$req = mysql_query("SELECT * from appartement where wilaya='$wilaya' and date>='$deb' and date<='$dfin' and type_transaction='$trans' in ('$chox1','$chox2','$chox3') ORDER BY date DESC LIMIT $debut,$nb_rep_pages ");
}
else
if($type_client=="particulier")
{
$req = mysql_query("SELECT * from appartement where wilaya='$wilaya' and date>='$deb' and date<='$dfin' and type_client='particulier' and type_transaction='$trans' in ('$chox1','$chox2','$chox3') ORDER BY date DESC LIMIT $debut,$nb_rep_pages ") ;
}
else
if($type_client=="agence")
{
$req = mysql_query("SELECT * from appartement where wilaya='$wilaya' and date>='$deb' and date<='$dfin' and type_client='agence' and num_client='$agence' and type_transaction='$trans' in ('$chox1','$chox2','$chox3') ORDER BY date DESC LIMIT $debut,$nb_rep_pages ");
}
// Ici on calcul le nombre de page
$nbpages = ceil($fin / $nb_rep_pages); // Ici on arrondi