Pb php requête base de données [Résolu]
Dernière réponse : dans Programmation
Bonjour à tous.
J'ai une erreur, a l'affichage ça donne ça :
SELECT * FROM poste whereCoef between 0 and 1000 order by Total desc
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\Program Files\EasyPHP 2.0b1\www\Site_HAY\tableau.php on line 182
mais je comprend pas à quoi cela signifie.
Voici le bout de code auquel sa correspond :
Merci
J'ai une erreur, a l'affichage ça donne ça :
SELECT * FROM poste whereCoef between 0 and 1000 order by Total desc
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\Program Files\EasyPHP 2.0b1\www\Site_HAY\tableau.php on line 182
mais je comprend pas à quoi cela signifie.
Voici le bout de code auquel sa correspond :
// requête SQL qui compte le nombre total d'enregistrement dans la table et qui récupère tous les enregistrements
$select = 'SELECT * FROM poste order by Total desc';
echo $select;
$result = mysql_query($select);
echo $result;
$total = mysql_num_rows($result); // ligne 182
echo $total;
Merci
Autres pages sur : php requete base donnees resolu
Lassé par la pub ? Créez un compte
Mon site (en fait c'est une petite appli avec interface web), est en local pour l'instant.
Je fais comment pour séparé le "whereCoef" vu que ce n'est que l'affichage de ma variable select ?
Je peux mettre le code complet si vous le souhaitez.
Personnelement je suis un débutant total en php, je ne fait que poursuivre le developpement de cette mini appli.
Je fais comment pour séparé le "whereCoef" vu que ce n'est que l'affichage de ma variable select ?
Je peux mettre le code complet si vous le souhaitez.
Personnelement je suis un débutant total en php, je ne fait que poursuivre le developpement de cette mini appli.
Re
ça change rien,
Je met mon code en entier pour ce fichier des fois que ça aide :
Merci bien de prendre du temps pour moi.
ça change rien,
Je met mon code en entier pour ce fichier des fois que ça aide :
<?php
// inclusion du logo
include ("logo.php");
//inclusion de l'en-tête de page
// By me
//if (!array_key_exists('print',$_GET)) $_GET['print']=0;
if (!$_GET['print']) include ("_top.php");
//inclusion du fichier contenant les différentes fonctions
include ("fonctions.php");
?>
<!--Page de répartition des postes -->
<h2 align = "center">Répartition des postes</h2>
<!--Formulaire de tri -->
<?php
// By me
//if (!array_key_exists('print',$_GET)) $_GET['print']=0;
if (!$_GET['print'])
{
?>
<form method="post" name="tri">
<div align="center"><strong><em>Sélectionnez vos critères de tri :</em></strong></div>
<table border="1" align = "center">
<tr>
<td colspan="4" align="center" bordercolor="#FFFFFF">
<?php $listeClassif=array("Tous"=>"Tous","Non Cadre"=>"Non Cadre","Cadre"=>"Cadre");
echo 'Classification : <select name="triClassif" onchange="document.tri.submit()">';
foreach ($listeClassif as $key=>$value)
{
$selected = ($_POST['triClassif'] == $key)?'selected':'';
echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
}
echo '</select>';
$listeEtat=array("Tous"=>"Tous","Actif"=>"Actif","Non Actif"=>"Non Actif");
echo ' Etat : <select name="triEtat">';
foreach ($listeEtat as $key=>$value)
{
$selected = ($_POST['triEtat'] == $key)?'selected':'';
echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
}
echo '</select>';
$listeStat=array("Tous"=>"Tous","Simulé"=>"Simulé","Validé"=>"Validé");
echo ' Statut : <select name="triStat">';
foreach ($listeStat as $key=>$value)
{
$selected = ($_POST['triStat'] == $key)?'selected':'';
echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
}
echo '</select>';
?>
</td>
</tr>
<tr>
<td colspan="6" align="center" bordercolor="#FFFFFF">
Coefficient entre :
<input name="triCoefMin" type="text" size=1 maxlength="3"
value="<?php if (isset($_POST['triClassif'])) echo $_POST['triCoefMin'];?>">
et :
<input name="triCoefMax" type="text" size=1 maxlength="3"
value="<?php if (isset($_POST['triClassif'])) echo $_POST['triCoefMax'];?>">
Point HAY entre :
<input name="triHAYMin" type="text" size=1 maxlength="3"
value="<?php if (isset($_POST['triClassif'])) echo $_POST['triHAYMin'];?>">
et :
<input name="triHAYMax" type="text" size=1 maxlength="3"
value="<?php if (isset($_POST['triClassif'])) echo $_POST['triHAYMax'];?>">
<?php
if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre')
{
$listeClasse=array("A"=>"A","B"=>"B","C"=>"C","D"=>"D","E"=>"E","F"=>"F","G"=>"G");
echo 'Classe : <select name="triClassMin">';
foreach ($listeClasse as $key=>$value)
{
$selected = ($_POST['triClassMin'] == $key)?'selected':'';
echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
}
echo '</select>';
$listeClasseR=array("G"=>"G","F"=>"F","E"=>"E","D"=>"D","C"=>"C","B"=>"B","A"=>"A");
echo 'à : <select name="triClassMax">';
foreach ($listeClasseR as $key=>$value)
{
$selected = ($_POST['triClassMax'] == $key)?'selected':'';
echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
}
echo '</select>';
}
else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre')
{
$listeGroupe=array("I"=>"I","II"=>"II","III"=>"III","IV"=>"IV","V"=>"V","VI"=>"VI","VII"=>"VII");
echo 'Groupe : <select name="triClassMin">';
foreach ($listeGroupe as $key=>$value)
{
$selected = ($_POST['triClassMin'] == $key)?'selected':'';
echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
}
echo '</select>';
$listeGroupeR=array("VII"=>"VII","VI"=>"VI","V"=>"V","IV"=>"IV","III"=>"III","II"=>"II","I" =>"I");
echo 'à : <select name="triClassMax">';
foreach ($listeGroupeR as $key=>$value)
{
$selected = ($_POST['triClassMax'] == $key)?'selected':'';
echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
}
echo '</select>';
}
?>
</td>
</tr>
<tr align="center">
<td align="center" bordercolor="#FFFFFF"><input type="submit" name="ok" value="Ok"></td>
</tr>
</table>
</form>
<?php
}
if (isset($_POST["ok"]))
{
$select = 'SELECT * FROM poste where';
if ($_POST['triCoefMin'] == '' && $_POST['triCoefMax'] == '')
$select .= 'Coef between 0 and 1000';
else if ($_POST['triCoefMin'] <> '' && !is_numeric($_POST['triCoefMin']))
{alert("Le coefficient minimum doit être un chiffre!");
retour();}
else if ($_POST['triCoefMax'] <> '' && !is_numeric($_POST['triCoefMax']))
{alert("Le coefficient maximum doit être un chiffre!");
retour();}
else if ($_POST['triCoefMin'] <> '' && $_POST['triCoefMax'] <> '' && $_POST['triCoefMin'] > $_POST['triCoefMax'])
{alert("Le coefficient minimum doit être inférieur au coefficient maximum!");
retour();}
else if ($_POST['triCoefMin'] <> '' && $_POST['triCoefMax'] == '')
$select .= ' Coef="'.$_POST['triCoefMin'].'"';
else if ($_POST['triCoefMax'] <> '' && $_POST['triCoefMin'] == '')
$select .= ' Coef="'.$_POST['triCoefMax'].'"';
else if ($_POST['triCoefMin'] <> '' && $_POST['triCoefMax'] <> '')
$select .= ' Coef between "'.$_POST['triCoefMin'].'" and "'.$_POST['triCoefMax'].'"';
if ($_POST['triClassif'] == 'Cadre')
$select .= ' and Classification="Cadre"';
if ($_POST['triClassif'] == 'Non Cadre')
$select .= ' and Classification="Non Cadre"';
if ($_POST['triEtat'] == 'Actif')
$select .= ' and Etat="Actif"';
if ($_POST['triEtat'] == 'Non Actif')
$select .= ' and Etat="Non Actif"';
if ($_POST['triStat'] == 'Simulé')
$select .= ' and Statut="Simulé"';
if ($_POST['triStat'] == 'Validé')
$select .= ' and Statut="Validé"';
if ($_POST['triHayMin'] <> '' && !is_numeric($_POST['triHayMin']))
{alert("Le total HAY minimum doit être un chiffre!");
retour();}
else if ($_POST['triHayMax'] <> '' && !is_numeric($_POST['triHayMax']))
{alert("Le total HAY maximum doit être un chiffre!");
retour();}
else if ($_POST['triHayMin'] <> '' && $_POST['triHayMax'] <> '' && $_POST['triHayMin'] > $_POST['triHayMax'])
{alert("Le total HAY minimum doit être inférieur au total HAY maximum!");
retour();}
else if ($_POST['triHAYMin'] <> '' && $_POST['triHAYMax'] == '')
$select .= ' and Total='.$_POST['triHAYMin'];
else if ($_POST['triHAYMax'] <> '' && $_POST['triHAYMin'] == '')
$select .= ' and Total='.$_POST['triHAYMax'];
else if ($_POST['triHAYMin'] <> '' && $_POST['triHAYMax'] <> '')
$select .= ' and Total between '.$_POST['triHAYMin'].' and '.$_POST['triHAYMax'];
if (isset($_POST['triClassMin']) || $_POST['triClassMax'])
$select .= ' and Classement between "'.$_POST['triClassMin'].'" and "'.$_POST['triClassMax'].'"';
$select .= ' order by Total desc';
}
else
// requête SQL qui compte le nombre total d'enregistrement dans la table et qui récupère tous les enregistrements
$select = 'SELECT * FROM poste order by Total desc';
echo $select;
$result = mysql_query($select, $link);
echo $result;
$total = mysql_num_rows($result);
echo $total;
if($total)
{
while ($row = mysql_fetch_array($result))
{
if ($row['Direction'] == "DC" && ($row['Classement'] == "VII" || $row['Classement'] == "G"))
$txtDCG .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DG" && ($row['Classement'] == "VII" || $row['Classement'] == "G"))
$txtDGG .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DLM" && ($row['Classement'] == "VII" || $row['Classement'] == "G"))
$txtDLMG .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DO" && ($row['Classement'] == "VII" || $row['Classement'] == "G"))
$txtDOG .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DT" && ($row['Classement'] == "VII" || $row['Classement'] == "G"))
$txtDTG .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "INFO" && ($row['Classement'] == "VII" || $row['Classement'] == "G"))
$txtINFOG .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "MKG" && ($row['Classement'] == "VII" || $row['Classement'] == "G"))
$txtMKGG .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "RH" && ($row['Classement'] == "VII" || $row['Classement'] == "G"))
$txtRHG .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "SG" && ($row['Classement'] == "VII" || $row['Classement'] == "G"))
$txtSGG .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
/***********************************************************************************************/
if ($row['Direction'] == "DC" && ($row['Classement'] == "VI" || $row['Classement'] == "F"))
$txtDCF .= $row['NumDP']." ".$row['Intitule']." - ".$row['Total']." - ".$row['Coef']."<BR>";
if ($row['Direction'] == "DG" && ($row['Classement'] == "VI" || $row['Classement'] == "F"))
$txtDGF .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DLM" && ($row['Classement'] == "VI" || $row['Classement'] == "F"))
$txtDLMF .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DO" && ($row['Classement'] == "VI" || $row['Classement'] == "F"))
$txtDOF .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DT" && ($row['Classement'] == "VI" || $row['Classement'] == "F"))
$txtDTF .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "INFO" && ($row['Classement'] == "VI" || $row['Classement'] == "F"))
$txtINFOF .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "MKG" && ($row['Classement'] == "VI" || $row['Classement'] == "F"))
$txtMKGF .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "RH" && ($row['Classement'] == "VI" || $row['Classement'] == "F"))
$txtRHF .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "SG" && ($row['Classement'] == "VI" || $row['Classement'] == "F"))
$txtSGF .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
/***********************************************************************************************/
if ($row['Direction'] == "DC" && ($row['Classement'] == "V" || $row['Classement'] == "E"))
$txtDCE .= $row['NumDP']." ".$row['Intitule']." - ".$row['Total']." - ".$row['Coef']."<BR>";
if ($row['Direction'] == "DG" && ($row['Classement'] == "V" || $row['Classement'] == "E"))
$txtDGE .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DLM" && ($row['Classement'] == "V" || $row['Classement'] == "E"))
$txtDLME .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DO" && ($row['Classement'] == "V" || $row['Classement'] == "E"))
$txtDOE .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DT" && ($row['Classement'] == "V" || $row['Classement'] == "E"))
$txtDTE .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "INFO" && ($row['Classement'] == "V" || $row['Classement'] == "E"))
$txtINFOE .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "MKG" && ($row['Classement'] == "V" || $row['Classement'] == "E"))
$txtMKGE .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "RH" && ($row['Classement'] == "V" || $row['Classement'] == "E"))
$txtRHE .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "SG" && ($row['Classement'] == "V" || $row['Classement'] == "E"))
$txtSGE .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
/***********************************************************************************************/
if ($row['Direction'] == "DC" && ($row['Classement'] == "IV" || $row['Classement'] == "D"))
$txtDCD .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DG" && ($row['Classement'] == "IV" || $row['Classement'] == "D"))
$txtDGD .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DLM" && ($row['Classement'] == "IV" || $row['Classement'] == "D"))
$txtDLMD .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DO" && ($row['Classement'] == "IV" || $row['Classement'] == "D"))
$txtDOD .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DT" && ($row['Classement'] == "IV" || $row['Classement'] == "D"))
$txtDTD .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "INFO" && ($row['Classement'] == "IV" || $row['Classement'] == "D"))
$txtINFOD .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "MKG" && ($row['Classement'] == "IV" || $row['Classement'] == "D"))
$txtMKGD .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "RH" && ($row['Classement'] == "IV" || $row['Classement'] == "D"))
$txtRHD .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "SG" && ($row['Classement'] == "IV" || $row['Classement'] == "D"))
$txtSGD .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
/***********************************************************************************************/
if ($row['Direction'] == "DC" && ($row['Classement'] == "III" || $row['Classement'] == "C"))
$txtDCC .= $row['NumDP']." ".$row['Intitule']." - ".$row['Total']." - ".$row['Coef']."<BR>";
if ($row['Direction'] == "DG" && ($row['Classement'] == "III" || $row['Classement'] == "C"))
$txtDGC .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DLM" && ($row['Classement'] == "III" || $row['Classement'] == "C"))
$txtDLMC .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DO" && ($row['Classement'] == "III" || $row['Classement'] == "C"))
$txtDOC .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DT" && ($row['Classement'] == "III" || $row['Classement'] == "C"))
$txtDTC .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "INFO" && ($row['Classement'] == "III" || $row['Classement'] == "C"))
$txtINFOC .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "MKG" && ($row['Classement'] == "III" || $row['Classement'] == "C"))
$txtMKGC .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "RH" && ($row['Classement'] == "III" || $row['Classement'] == "C"))
$txtRHC .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "SG" && ($row['Classement'] == "III" || $row['Classement'] == "C"))
$txtSGC .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
/***********************************************************************************************/
if ($row['Direction'] == "DC" && ($row['Classement'] == "II" || $row['Classement'] == "B"))
$txtDCB .= $row['NumDP']." ".$row['Intitule']." - ".$row['Total']." - ".$row['Coef']."<BR>";
if ($row['Direction'] == "DG" && ($row['Classement'] == "II" || $row['Classement'] == "B"))
$txtDGB .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DLM" && ($row['Classement'] == "II" || $row['Classement'] == "B"))
$txtDLMB .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DO" && ($row['Classement'] == "II" || $row['Classement'] == "B"))
$txtDOB .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DT" && ($row['Classement'] == "II" || $row['Classement'] == "B"))
$txtDTB .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "INFO" && ($row['Classement'] == "II" || $row['Classement'] == "B"))
$txtINFOB .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "MKG" && ($row['Classement'] == "II" || $row['Classement'] == "B"))
$txtMKGB .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "RH" && ($row['Classement'] == "II" || $row['Classement'] == "B"))
$txtRHB .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "SG" && ($row['Classement'] == "II" || $row['Classement'] == "B"))
$txtSGB .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
/***********************************************************************************************/
if ($row['Direction'] == "DC" && ($row['Classement'] == "I" || $row['Classement'] == "A"))
$txtDCA .= $row['NumDP']." ".$row['Intitule']." - ".$row['Total']." - ".$row['Coef']."<BR>";
if ($row['Direction'] == "DG" && ($row['Classement'] == "I" || $row['Classement'] == "A"))
$txtDGA .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DLM" && ($row['Classement'] == "I" || $row['Classement'] == "A"))
$txtDLMA .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DO" && ($row['Classement'] == "I" || $row['Classement'] == "A"))
$txtDOA .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "DT" && ($row['Classement'] == "I" || $row['Classement'] == "A"))
$txtDTA .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "INFO" && ($row['Classement'] == "I" || $row['Classement'] == "A"))
$txtINFOA .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "MKG" && ($row['Classement'] == "I" || $row['Classement'] == "A"))
$txtMKGA .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "RH" && ($row['Classement'] == "I" || $row['Classement'] == "A"))
$txtRHA .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
if ($row['Direction'] == "SG" && ($row['Classement'] == "I" || $row['Classement'] == "A"))
$txtSGA .= $row['NumDP']." ".$row['Intitule']." ".$row['Total']." ".$row['Coef']."<BR>";
}
}
?>
<form name="tableau" method="post" action="">
<table width="1000" align="center" border="1" cellspacing="0" cellpadding="1">
<caption align="center" style="border:double">
Légende :<br />
N°DP Intitulé Points Hay Coefficient
<tr>
<th scope="col"> </th>
<th scope="col">DC</th>
<th scope="col">DG</th>
<th scope="col">DLM</th>
<th scope="col">DO</th>
<th scope="col">DT</th>
<th scope="col">INFO</th>
<th scope="col">MKG</th>
<th scope="col">RH</th>
<th scope="col">SG</th>
</tr>
<tr>
<th scope="row"><?php if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre') echo "VII";
else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre') echo "G";
else echo " ";?>
</th>
<td><?php if (isset($txtDCG)) echo $txtDCG; else echo " ";?></td>
<td><?php if (isset($txtDGG)) echo $txtDGG; else echo " ";?></td>
<td><?php if (isset($txtDLMG)) echo $txtDLMG; else echo " ";?></td>
<td><?php if (isset($txtDOG)) echo $txtDOG; else echo " ";?></td>
<td><?php if (isset($txtDTG)) echo $txtDTG; else echo " ";?></td>
<td><?php if (isset($txtINFOG)) echo $txtINFOG; else echo " ";?></td>
<td><?php if (isset($txtMKGG)) echo $txtMKGG; else echo " ";?></td>
<td><?php if (isset($txtRHG)) echo $txtRHG; else echo " ";?></td>
<td><?php if (isset($txtSGG)) echo $txtSGCG; else echo " ";?></td>
</tr>
<tr>
<th scope="row"><?php if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre') echo "VI";
else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre') echo "F";
else echo " ";?>
</th>
<td><?php if (isset($txtDCF)) echo $txtDCF; else echo " ";?></td>
<td><?php if (isset($txtDGF)) echo $txtDGF; else echo " ";?></td>
<td><?php if (isset($txtDLMF)) echo $txtDLMF; else echo " ";?></td>
<td><?php if (isset($txtDOF)) echo $txtDOF; else echo " ";?></td>
<td><?php if (isset($txtDTF)) echo $txtDTF; else echo " ";?></td>
<td><?php if (isset($txtINFOF)) echo $txtINFOF; else echo " ";?></td>
<td><?php if (isset($txtMKGF)) echo $txtMKGF; else echo " ";?></td>
<td><?php if (isset($txtRHF)) echo $txtRHF; else echo " ";?></td>
<td><?php if (isset($txtSGF)) echo $txtSGCF; else echo " ";?></td>
</tr>
<tr>
<th scope="row"><?php if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre') echo "V";
else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre') echo "E";
else echo " ";?>
</th>
<td><?php if (isset($txtDCE)) echo $txtDCE; else echo " ";?></td>
<td><?php if (isset($txtDGE)) echo $txtDGE; else echo " ";?></td>
<td><?php if (isset($txtDLME)) echo $txtDLME; else echo " ";?></td>
<td><?php if (isset($txtDOE)) echo $txtDOE; else echo " ";?></td>
<td><?php if (isset($txtDTE)) echo $txtDTE; else echo " ";?></td>
<td><?php if (isset($txtINFOE)) echo $txtINFOE; else echo " ";?></td>
<td><?php if (isset($txtMKGE)) echo $txtMKGE; else echo " ";?></td>
<td><?php if (isset($txtRHE)) echo $txtRHE; else echo " ";?></td>
<td><?php if (isset($txtSGE)) echo $txtSGCE; else echo " ";?></td>
</tr>
<tr>
<th scope="row"><?php if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre') echo "IV";
else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre') echo "D";
else echo " ";?>
</th>
<td><?php if (isset($txtDCD)) echo $txtDCD; else echo " ";?></td>
<td><?php if (isset($txtDGD)) echo $txtDGD; else echo " ";?></td>
<td><?php if (isset ($txtDLMD)) echo $txtDLMD; else echo " ";?></td>
<td><?php if (isset ($txtDOD)) echo $txtDOD; else echo " ";?></td>
<td><?php if (isset($txtDTD)) echo $txtDTD; else echo " ";?></td>
<td><?php if (isset($txtINFOD)) echo $txtINFOD; else echo " ";?></td>
<td><?php if (isset($txtMKGD)) echo $txtMKGD; else echo " ";?></td>
<td><?php if (isset($txtRHD)) echo $txtRHD; else echo " ";?></td>
<td><?php if (isset($txtSGD)) echo $txtSGCD; else echo " ";?></td>
</tr>
<tr>
<th scope="row"><?php if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre') echo "III";
else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre') echo "C";
else echo " ";?>
</th>
<td><?php if (isset($txtDCC)) echo $txtDCC; else echo " ";?></td>
<td><?php if (isset($txtDGC)) echo $txtDGC; else echo " ";?></td>
<td><?php if (isset($txtDLMC)) echo $txtDLMC; else echo " ";?></td>
<td><?php if (isset($txtDOC)) echo $txtDOC; else echo " ";?></td>
<td><?php if (isset($txtDTC)) echo $txtDTC; else echo " ";?></td>
<td><?php if (isset($txtINFOC)) echo $txtINFOC; else echo " ";?></td>
<td><?php if (isset($txtMKGC)) echo $txtMKGC; else echo " ";?></td>
<td><?php if (isset($txtRHC)) echo $txtRHC; else echo " ";?></td>
<td><?php if (isset($txtSGC)) echo $txtSGCC; else echo " ";?></td>
</tr>
<tr>
<th scope="row"><?php if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre') echo "II";
else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre') echo "B";
else echo " ";?>
</th>
<td><?php if (isset($txtDCB)) echo $txtDCB; else echo " ";?></td>
<td><?php if (isset($txtDGB)) echo $txtDGB; else echo " ";?></td>
<td><?php if (isset($txtDLMB)) echo $txtDLMB; else echo " ";?></td>
<td><?php if (isset($txtDOB)) echo $txtDOB; else echo " ";?></td>
<td><?php if (isset($txtDTB)) echo $txtDTB; else echo " ";?></td>
<td><?php if (isset($txtINFOB)) echo $txtINFOB; else echo " ";?></td>
<td><?php if (isset($txtMKGB)) echo $txtMKGB; else echo " ";?></td>
<td><?php if (isset($txtRHB)) echo $txtRHB; else echo " ";?></td>
<td><?php if (isset($txtSGB)) echo $txtSGCB; else echo " ";?></td>
</tr>
<tr>
<th scope="row"><?php if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre') echo "I";
else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre') echo "A";
else echo " ";?>
</th>
<td><?php if (isset($txtDCA)) echo $txtDCA; else echo " ";?></td>
<td><?php if (isset($txtDGA)) echo $txtDGA; else echo " ";?></td>
<td><?php if (isset($txtDLMA)) echo $txtDLMA; else echo " ";?></td>
<td><?php if (isset($txtDOA)) echo $txtDOA; else echo " ";?></td>
<td><?php if (isset($txtDTA)) echo $txtDTA; else echo " ";?></td>
<td><?php if (isset($txtINFOA)) echo $txtINFOA; else echo " ";?></td>
<td><?php if (isset($txtMKGA)) echo $txtMKGA; else echo " ";?></td>
<td><?php if (isset($txtRHA)) echo $txtRHA; else echo " ";?></td>
<td><?php if (isset($txtSGA)) echo $txtSGCA; else echo " ";?></td>
</tr>
<?php if (!$_GET['print']){?>
<tr align="center">
<td colspan="10"><input name="printtab" type="submit" value="Imprimer le tableau"
onclick="window.document.tableau.action='tableau.php?print=TRUE';"></td>
</tr>
<?php
}
?>
</table>
</form>
<?php
if ($_GET['print']) { echo '<div align="center"><a href="tableau.php">Revenir au tableau de répartition</a></div>'; imprimer();}
if (!$_GET['print']) include ("_btm.php");
?>
Merci bien de prendre du temps pour moi.
Lassé par la pub ? Créez un compte
- Contenus similaires :
Tags :
- ForumPhp formulaire base de données
- ForumAfficher contenu base de données php
- ForumPhp pb d'enregistrement dans ma base
- ForumConnexion base de données free
- ForumBase de données en c
- ForumBase de données et c
- ForumBase de données word 2003
- ForumCréer site base de données
- ForumBase de données internet
- ForumBase de données avec c
- Voir plus
zen, tranquille
)