Pb php requête base de données [Résolu] - Programmation
TomsGuide.com : 700 000 inscrits répondent à toutes vos questions high-tech et informatique.
Pour obtenir de l'aide, inscrivez-vous gratuitement !
 

Ajouter une réponse



 Mot :   Pseudo :  
 
Bas de page
Auteur
 Sujet : Pb php requête base de données [Résolu]
 
I'm Blond
Profil : IDNaute
Plus d'informations

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 :

Code :
  1. // requête SQL qui compte le nombre total d'enregistrement dans la table et qui récupère tous les enregistrements
  2. $select = 'SELECT * FROM poste order by Total desc';
  3. echo $select;
  4. $result = mysql_query($select);
  5. echo $result;
  6. $total = mysql_num_rows($result); // ligne 182
  7. echo $total;



Merci


Message édité par Bruenor911 le 10-04-2008 à 09:04:06
Liens spon sorisés

Inscrivez-vous ou connectez-vous pour masquer ceci.

quand on sait pas on ferme sa bouche
Profil : IDNaute
Plus d'informations

il est en ligne ton site? sinon c'est normal...

Profil : IDNaute
Plus d'informations

le bout de code ne correspond pas à l'erreur
et l'erreur porte sur le "whereCoef" attaché, il faut un espace


---------------
Ne pas oublier le [resolu] pour finir le sujet.
Penser à voir les tutos, ca peut aider!
I'm Blond
Profil : IDNaute
Plus d'informations

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.

Et voila!
Profil : IDNaute
Plus d'informations

Bruenor911 a écrit :


Je fais comment pour séparé le "whereCoef" vu que ce n'est que l'affichage de ma variable select ?



Tu mets un espace entre "where" et "Coef" ta requête devrait être:

SELECT * FROM poste where Coef between 0 and 1000 order by Total desc


---------------
Emplacement à louer pour une signature.
I'm Blond
Profil : IDNaute
Plus d'informations

Re

ça change rien,

Je met mon code en entier pour ce fichier des fois que ça aide :

Code :
  1. <?php
  2. // inclusion du logo
  3. include ("logo.php" );
  4. //inclusion de l'en-tête de page
  5. // By me
  6. //if (!array_key_exists('print',$_GET)) $_GET['print']=0;
  7. if (!$_GET['print']) include ("_top.php" );
  8. //inclusion du fichier contenant les différentes fonctions
  9. include ("fonctions.php" );
  10. ?>
  11. <!--Page de répartition des postes -->
  12. <h2 align = "center">Répartition des postes</h2>
  13. <!--Formulaire de tri -->
  14. <?php
  15.     // By me
  16.     //if (!array_key_exists('print',$_GET)) $_GET['print']=0;
  17.     if (!$_GET['print'])
  18. {
  19. ?>
  20. <form method="post" name="tri">
  21.   <div align="center"><strong><em>Sélectionnez vos critères de tri :</em></strong></div>
  22.   <table border="1" align = "center">
  23.     <tr>
  24.       <td colspan="4" align="center" bordercolor="#FFFFFF">
  25.               <?php $listeClassif=array("Tous"=>"Tous","Non Cadre"=>"Non Cadre","Cadre"=>"Cadre" );
  26.                 echo 'Classification : <select name="triClassif" onchange="document.tri.submit()">';
  27.                 foreach ($listeClassif as $key=>$value)
  28.                 {
  29.                     $selected = ($_POST['triClassif'] == $key)?'selected':'';
  30.                     echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
  31.                 }
  32.                 echo '</select>';
  33.                 $listeEtat=array("Tous"=>"Tous","Actif"=>"Actif","Non Actif"=>"Non Actif" );
  34.                 echo ' Etat : <select name="triEtat">';
  35.                 foreach ($listeEtat as $key=>$value)
  36.                 {
  37.                     $selected = ($_POST['triEtat'] == $key)?'selected':'';
  38.                     echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
  39.                 }
  40.                 echo '</select>';
  41.                 $listeStat=array("Tous"=>"Tous","Simulé"=>"Simulé","Validé"=>"Validé" );
  42.                 echo ' Statut : <select name="triStat">';
  43.                 foreach ($listeStat as $key=>$value)
  44.                 {
  45.                     $selected = ($_POST['triStat'] == $key)?'selected':'';
  46.                     echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
  47.                 }
  48.                 echo '</select>';
  49.             ?>
  50.       </td>
  51.     </tr>
  52.     <tr>
  53.       <td colspan="6" align="center" bordercolor="#FFFFFF">
  54.           Coefficient entre :
  55.         <input name="triCoefMin" type="text" size=1 maxlength="3"
  56.                     value="<?php if (isset($_POST['triClassif'])) echo $_POST['triCoefMin'];?>">
  57.         et :
  58.         <input name="triCoefMax" type="text" size=1 maxlength="3"
  59.                     value="<?php if (isset($_POST['triClassif'])) echo $_POST['triCoefMax'];?>">
  60.         Point HAY entre :
  61.         <input name="triHAYMin" type="text" size=1 maxlength="3"
  62.                     value="<?php if (isset($_POST['triClassif'])) echo $_POST['triHAYMin'];?>">
  63.         et :
  64.         <input name="triHAYMax" type="text" size=1 maxlength="3"
  65.                     value="<?php if (isset($_POST['triClassif'])) echo $_POST['triHAYMax'];?>">
  66.         <?php
  67.                 if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre')
  68.                 {
  69.                     $listeClasse=array("A"=>"A","B"=>"B","C"=>"C","D"=>"D","E"=>"E","F"=>"F","G"=>"G" );
  70.                     echo 'Classe : <select name="triClassMin">';
  71.                     foreach ($listeClasse as $key=>$value)
  72.                     {
  73.                         $selected = ($_POST['triClassMin'] == $key)?'selected':'';
  74.                         echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
  75.                     }
  76.                     echo '</select>';
  77.                     $listeClasseR=array("G"=>"G","F"=>"F","E"=>"E","D"=>"D","C"=>"C","B"=>"B","A"=>"A" );
  78.                     echo 'à : <select name="triClassMax">';
  79.                     foreach ($listeClasseR as $key=>$value)
  80.                     {
  81.                         $selected = ($_POST['triClassMax'] == $key)?'selected':'';
  82.                         echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
  83.                     }
  84.                     echo '</select>';
  85.                 }
  86.                 else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre')
  87.                 {
  88.                     $listeGroupe=array("I"=>"I","II"=>"II","III"=>"III","IV"=>"IV","V"=>"V","VI"=>"VI","VII"=>"VII" );
  89.                     echo 'Groupe : <select name="triClassMin">';
  90.                     foreach ($listeGroupe as $key=>$value)
  91.                     {
  92.                         $selected = ($_POST['triClassMin'] == $key)?'selected':'';
  93.                         echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
  94.                     }
  95.                     echo '</select>';
  96.                     $listeGroupeR=array("VII"=>"VII","VI"=>"VI","V"=>"V","IV"=>"IV","III"=>"III","II"=>"II","I" =>"I" );
  97.                     echo 'à : <select name="triClassMax">';
  98.                     foreach ($listeGroupeR as $key=>$value)
  99.                     {
  100.                         $selected = ($_POST['triClassMax'] == $key)?'selected':'';
  101.                         echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
  102.                     }
  103.                     echo '</select>';
  104.                 }
  105.         ?>
  106.       </td>
  107.     </tr>
  108.     <tr align="center">
  109.       <td align="center" bordercolor="#FFFFFF"><input type="submit" name="ok" value="Ok"></td>
  110.     </tr>
  111.   </table>
  112. </form>
  113. <?php
  114. }
  115. if (isset($_POST["ok"]))
  116. {
  117.     $select = 'SELECT * FROM poste where';
  118.     if ($_POST['triCoefMin'] == '' && $_POST['triCoefMax'] == '')
  119.         $select .= 'Coef between 0 and 1000';
  120.     else if ($_POST['triCoefMin'] <> '' && !is_numeric($_POST['triCoefMin']))
  121.         {alert("Le coefficient minimum doit être un chiffre!" );
  122.         retour();}
  123.     else if ($_POST['triCoefMax'] <> '' && !is_numeric($_POST['triCoefMax']))
  124.         {alert("Le coefficient maximum doit être un chiffre!" );
  125.         retour();}
  126.     else if ($_POST['triCoefMin'] <> '' && $_POST['triCoefMax'] <> '' && $_POST['triCoefMin'] > $_POST['triCoefMax'])
  127.         {alert("Le coefficient minimum doit être inférieur au coefficient maximum!" );
  128.         retour();}
  129.     else if ($_POST['triCoefMin'] <> '' && $_POST['triCoefMax'] == '')
  130.         $select .= ' Coef="'.$_POST['triCoefMin'].'"';
  131.     else if ($_POST['triCoefMax'] <> '' && $_POST['triCoefMin'] == '')
  132.         $select .= ' Coef="'.$_POST['triCoefMax'].'"';
  133.     else if ($_POST['triCoefMin'] <> '' && $_POST['triCoefMax'] <> '')
  134.         $select .= ' Coef between "'.$_POST['triCoefMin'].'" and "'.$_POST['triCoefMax'].'"';
  135.     if ($_POST['triClassif'] == 'Cadre')
  136.         $select .= ' and Classification="Cadre"';
  137.     if ($_POST['triClassif'] == 'Non Cadre')
  138.         $select .= ' and Classification="Non Cadre"';
  139.     if ($_POST['triEtat'] == 'Actif')
  140.         $select .= ' and Etat="Actif"';
  141.     if ($_POST['triEtat'] == 'Non Actif')
  142.         $select .= ' and Etat="Non Actif"';
  143.     if ($_POST['triStat'] == 'Simulé')
  144.         $select .= ' and Statut="Simulé"';
  145.     if ($_POST['triStat'] == 'Validé')
  146.         $select .= ' and Statut="Validé"';
  147.     if ($_POST['triHayMin'] <> '' && !is_numeric($_POST['triHayMin']))
  148.         {alert("Le total HAY minimum doit être un chiffre!" );
  149.         retour();}
  150.     else if ($_POST['triHayMax'] <> '' && !is_numeric($_POST['triHayMax']))
  151.         {alert("Le total HAY maximum doit être un chiffre!" );
  152.         retour();}
  153.     else if ($_POST['triHayMin'] <> '' && $_POST['triHayMax'] <> '' && $_POST['triHayMin'] > $_POST['triHayMax'])
  154.         {alert("Le total HAY minimum doit être inférieur au total HAY maximum!" );
  155.         retour();}
  156.     else if ($_POST['triHAYMin'] <> '' && $_POST['triHAYMax'] == '')
  157.         $select .= ' and Total='.$_POST['triHAYMin'];
  158.     else if ($_POST['triHAYMax'] <> '' && $_POST['triHAYMin'] == '')
  159.         $select .= ' and Total='.$_POST['triHAYMax'];
  160.     else if ($_POST['triHAYMin'] <> '' && $_POST['triHAYMax'] <> '')
  161.         $select .= ' and Total between '.$_POST['triHAYMin'].' and '.$_POST['triHAYMax'];
  162.     if (isset($_POST['triClassMin']) || $_POST['triClassMax'])
  163.         $select .= ' and Classement between "'.$_POST['triClassMin'].'" and "'.$_POST['triClassMax'].'"';
  164.     $select .= ' order by Total desc';
  165. }
  166. else
  167.     // requête SQL qui compte le nombre total d'enregistrement dans la table et qui récupère tous les enregistrements    
  168.     $select = 'SELECT * FROM poste order by Total desc';
  169.     echo $select;
  170.     $result = mysql_query($select, $link);
  171.     echo $result;
  172.     $total = mysql_num_rows($result);
  173.     echo $total;
  174. if($total)
  175. {
  176.     while ($row = mysql_fetch_array($result))
  177.       {
  178.            if ($row['Direction'] == "DC" && ($row['Classement'] == "VII" || $row['Classement'] == "G" ))
  179.              $txtDCG .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  180.         if ($row['Direction'] == "DG" && ($row['Classement'] == "VII" || $row['Classement'] == "G" ))
  181.             $txtDGG .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  182.         if ($row['Direction'] == "DLM" && ($row['Classement'] == "VII" || $row['Classement'] == "G" ))
  183.             $txtDLMG .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  184.         if ($row['Direction'] == "DO" && ($row['Classement'] == "VII" || $row['Classement'] == "G" ))
  185.             $txtDOG .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  186.         if ($row['Direction'] == "DT" && ($row['Classement'] == "VII" || $row['Classement'] == "G" ))
  187.             $txtDTG .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  188.         if ($row['Direction'] == "INFO" && ($row['Classement'] == "VII" || $row['Classement'] == "G" ))
  189.             $txtINFOG .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  190.         if ($row['Direction'] == "MKG" && ($row['Classement'] == "VII" || $row['Classement'] == "G" ))
  191.             $txtMKGG .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  192.         if ($row['Direction'] == "RH" && ($row['Classement'] == "VII" || $row['Classement'] == "G" ))
  193.             $txtRHG .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>"; 
  194.         if ($row['Direction'] == "SG" && ($row['Classement'] == "VII" || $row['Classement'] == "G" ))
  195.             $txtSGG .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  196.         /***********************************************************************************************/
  197.         if ($row['Direction'] == "DC" && ($row['Classement'] == "VI" || $row['Classement'] == "F" ))
  198.              $txtDCF .= $row['NumDP']."&nbsp;".$row['Intitule']." - ".$row['Total']." - ".$row['Coef']."<BR>";
  199.         if ($row['Direction'] == "DG" && ($row['Classement'] == "VI" || $row['Classement'] == "F" ))
  200.             $txtDGF .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  201.         if ($row['Direction'] == "DLM" && ($row['Classement'] == "VI" || $row['Classement'] == "F" ))
  202.             $txtDLMF .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  203.         if ($row['Direction'] == "DO" && ($row['Classement'] == "VI" || $row['Classement'] == "F" ))
  204.             $txtDOF .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  205.         if ($row['Direction'] == "DT" && ($row['Classement'] == "VI" || $row['Classement'] == "F" ))
  206.             $txtDTF .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  207.         if ($row['Direction'] == "INFO" && ($row['Classement'] == "VI" || $row['Classement'] == "F" ))
  208.             $txtINFOF .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  209.         if ($row['Direction'] == "MKG" && ($row['Classement'] == "VI" || $row['Classement'] == "F" ))
  210.             $txtMKGF .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  211.         if ($row['Direction'] == "RH" && ($row['Classement'] == "VI" || $row['Classement'] == "F" ))
  212.             $txtRHF .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>"; 
  213.         if ($row['Direction'] == "SG" && ($row['Classement'] == "VI" || $row['Classement'] == "F" ))
  214.             $txtSGF .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  215.         /***********************************************************************************************/
  216.         if ($row['Direction'] == "DC" && ($row['Classement'] == "V" || $row['Classement'] == "E" ))
  217.              $txtDCE .= $row['NumDP']."&nbsp;".$row['Intitule']." - ".$row['Total']." - ".$row['Coef']."<BR>";
  218.         if ($row['Direction'] == "DG" && ($row['Classement'] == "V" || $row['Classement'] == "E" ))
  219.             $txtDGE .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  220.         if ($row['Direction'] == "DLM" && ($row['Classement'] == "V" || $row['Classement'] == "E" ))
  221.             $txtDLME .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  222.         if ($row['Direction'] == "DO" && ($row['Classement'] == "V" || $row['Classement'] == "E" ))
  223.             $txtDOE .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  224.         if ($row['Direction'] == "DT" && ($row['Classement'] == "V" || $row['Classement'] == "E" ))
  225.             $txtDTE .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  226.         if ($row['Direction'] == "INFO" && ($row['Classement'] == "V" || $row['Classement'] == "E" ))
  227.             $txtINFOE .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  228.         if ($row['Direction'] == "MKG" && ($row['Classement'] == "V" || $row['Classement'] == "E" ))
  229.             $txtMKGE .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  230.         if ($row['Direction'] == "RH" && ($row['Classement'] == "V" || $row['Classement'] == "E" ))
  231.             $txtRHE .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  232.         if ($row['Direction'] == "SG" && ($row['Classement'] == "V" || $row['Classement'] == "E" ))
  233.             $txtSGE .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  234.         /***********************************************************************************************/
  235.         if ($row['Direction'] == "DC" && ($row['Classement'] == "IV" || $row['Classement'] == "D" ))
  236.              $txtDCD .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  237.         if ($row['Direction'] == "DG" && ($row['Classement'] == "IV" || $row['Classement'] == "D" ))
  238.             $txtDGD .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  239.         if ($row['Direction'] == "DLM" && ($row['Classement'] == "IV" || $row['Classement'] == "D" ))
  240.             $txtDLMD .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  241.         if ($row['Direction'] == "DO" && ($row['Classement'] == "IV" || $row['Classement'] == "D" ))
  242.             $txtDOD .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  243.         if ($row['Direction'] == "DT" && ($row['Classement'] == "IV" || $row['Classement'] == "D" ))
  244.             $txtDTD .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  245.         if ($row['Direction'] == "INFO" && ($row['Classement'] == "IV" || $row['Classement'] == "D" ))
  246.             $txtINFOD .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  247.         if ($row['Direction'] == "MKG" && ($row['Classement'] == "IV" || $row['Classement'] == "D" ))
  248.             $txtMKGD .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  249.         if ($row['Direction'] == "RH" && ($row['Classement'] == "IV" || $row['Classement'] == "D" ))
  250.             $txtRHD .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  251.         if ($row['Direction'] == "SG" && ($row['Classement'] == "IV" || $row['Classement'] == "D" ))
  252.             $txtSGD .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  253.         /***********************************************************************************************/
  254.         if ($row['Direction'] == "DC" && ($row['Classement'] == "III" || $row['Classement'] == "C" ))
  255.              $txtDCC .= $row['NumDP']."&nbsp;".$row['Intitule']." - ".$row['Total']." - ".$row['Coef']."<BR>";
  256.         if ($row['Direction'] == "DG" && ($row['Classement'] == "III" || $row['Classement'] == "C" ))
  257.             $txtDGC .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  258.         if ($row['Direction'] == "DLM" && ($row['Classement'] == "III" || $row['Classement'] == "C" ))
  259.             $txtDLMC .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  260.         if ($row['Direction'] == "DO" && ($row['Classement'] == "III" || $row['Classement'] == "C" ))
  261.             $txtDOC .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  262.         if ($row['Direction'] == "DT" && ($row['Classement'] == "III" || $row['Classement'] == "C" ))
  263.             $txtDTC .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  264.         if ($row['Direction'] == "INFO" && ($row['Classement'] == "III" || $row['Classement'] == "C" ))
  265.             $txtINFOC .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  266.         if ($row['Direction'] == "MKG" && ($row['Classement'] == "III" || $row['Classement'] == "C" ))
  267.             $txtMKGC .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  268.         if ($row['Direction'] == "RH" && ($row['Classement'] == "III" || $row['Classement'] == "C" ))
  269.             $txtRHC .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  270.         if ($row['Direction'] == "SG" && ($row['Classement'] == "III" || $row['Classement'] == "C" ))
  271.             $txtSGC .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  272.         /***********************************************************************************************/
  273.         if ($row['Direction'] == "DC" && ($row['Classement'] == "II" || $row['Classement'] == "B" ))
  274.              $txtDCB .= $row['NumDP']."&nbsp;".$row['Intitule']." - ".$row['Total']." - ".$row['Coef']."<BR>";
  275.         if ($row['Direction'] == "DG" && ($row['Classement'] == "II" || $row['Classement'] == "B" ))
  276.             $txtDGB .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  277.         if ($row['Direction'] == "DLM" && ($row['Classement'] == "II" || $row['Classement'] == "B" ))
  278.             $txtDLMB .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  279.         if ($row['Direction'] == "DO" && ($row['Classement'] == "II" || $row['Classement'] == "B" ))
  280.             $txtDOB .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  281.         if ($row['Direction'] == "DT" && ($row['Classement'] == "II" || $row['Classement'] == "B" ))
  282.             $txtDTB .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  283.         if ($row['Direction'] == "INFO" && ($row['Classement'] == "II" || $row['Classement'] == "B" ))
  284.             $txtINFOB .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  285.         if ($row['Direction'] == "MKG" && ($row['Classement'] == "II" || $row['Classement'] == "B" ))
  286.             $txtMKGB .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  287.         if ($row['Direction'] == "RH" && ($row['Classement'] == "II" || $row['Classement'] == "B" ))
  288.             $txtRHB .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  289.         if ($row['Direction'] == "SG" && ($row['Classement'] == "II" || $row['Classement'] == "B" ))
  290.             $txtSGB .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  291.         /***********************************************************************************************/
  292.         if ($row['Direction'] == "DC" && ($row['Classement'] == "I" || $row['Classement'] == "A" ))
  293.              $txtDCA .= $row['NumDP']."&nbsp;".$row['Intitule']." - ".$row['Total']." - ".$row['Coef']."<BR>";
  294.         if ($row['Direction'] == "DG" && ($row['Classement'] == "I" || $row['Classement'] == "A" ))
  295.             $txtDGA .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  296.         if ($row['Direction'] == "DLM" && ($row['Classement'] == "I" || $row['Classement'] == "A" ))
  297.             $txtDLMA .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  298.         if ($row['Direction'] == "DO" && ($row['Classement'] == "I" || $row['Classement'] == "A" ))
  299.             $txtDOA .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  300.         if ($row['Direction'] == "DT" && ($row['Classement'] == "I" || $row['Classement'] == "A" ))
  301.             $txtDTA .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  302.         if ($row['Direction'] == "INFO" && ($row['Classement'] == "I" || $row['Classement'] == "A" ))
  303.             $txtINFOA .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  304.         if ($row['Direction'] == "MKG" && ($row['Classement'] == "I" || $row['Classement'] == "A" ))
  305.             $txtMKGA .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  306.         if ($row['Direction'] == "RH" && ($row['Classement'] == "I" || $row['Classement'] == "A" ))
  307.             $txtRHA .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  308.         if ($row['Direction'] == "SG" && ($row['Classement'] == "I" || $row['Classement'] == "A" ))
  309.             $txtSGA .= $row['NumDP']."&nbsp;".$row['Intitule']."&nbsp;".$row['Total']."&nbsp;".$row['Coef']."<BR>";
  310.     }
  311. }
  312. ?>
  313. <form name="tableau" method="post" action="">
  314.   <table width="1000" align="center" border="1" cellspacing="0" cellpadding="1">
  315.     <caption align="center" style="border:double">
  316.     Légende :<br />
  317.     N°DP Intitulé Points Hay Coefficient
  318.     <tr>
  319.       <th scope="col">&nbsp;</th>
  320.       <th scope="col">DC</th>
  321.       <th scope="col">DG</th>
  322.       <th scope="col">DLM</th>
  323.       <th scope="col">DO</th>
  324.       <th scope="col">DT</th>
  325.       <th scope="col">INFO</th>
  326.       <th scope="col">MKG</th>
  327.       <th scope="col">RH</th>
  328.       <th scope="col">SG</th>
  329.     </tr>
  330.     <tr>
  331.       <th scope="row"><?php if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre') echo "VII";
  332.                       else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre') echo "G";
  333.                       else echo "&nbsp;";?>
  334.       </th>
  335.       <td><?php if (isset($txtDCG)) echo $txtDCG; else echo "&nbsp;";?></td>
  336.       <td><?php if (isset($txtDGG)) echo $txtDGG; else echo "&nbsp;";?></td>
  337.       <td><?php if (isset($txtDLMG)) echo $txtDLMG; else echo "&nbsp;";?></td>
  338.       <td><?php if (isset($txtDOG)) echo $txtDOG; else echo "&nbsp;";?></td>
  339.       <td><?php if (isset($txtDTG)) echo $txtDTG; else echo "&nbsp;";?></td>
  340.       <td><?php if (isset($txtINFOG)) echo $txtINFOG; else echo "&nbsp;";?></td>
  341.       <td><?php if (isset($txtMKGG)) echo $txtMKGG; else echo "&nbsp;";?></td>
  342.       <td><?php if (isset($txtRHG)) echo $txtRHG; else echo "&nbsp;";?></td>
  343.       <td><?php if (isset($txtSGG)) echo $txtSGCG; else echo "&nbsp;";?></td>
  344.     </tr>
  345.     <tr>
  346.       <th scope="row"><?php if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Non Cadre') echo "VI";
  347.                       else if (isset($_POST['triClassif']) && $_POST['triClassif'] == 'Cadre') echo "F";
  348.                       else echo "&nbsp;";?>
  349.       </th>
  350.       <td><?php if (isset($txtDCF)) echo $txtDCF; else echo "&nbsp;";?></td>
  351.       <td><?php if (isset($txtDGF)) echo $txtDGF; else echo "&nbsp;";?></td>
  352.       <td><?php if (isset($txtDLMF)) echo $txtDLMF; else echo "&nbsp;";?></td>
  353.       <td><?php if (isset($txtDOF)) echo $txtDOF; else echo "&nbsp;";?></td>
  354.       <td><?php if (isset($txtDTF)) echo $txtDTF; else echo "&nbsp;";?></td>
  355.       <td><?php if (isset($txtINFOF)) echo $txtINFOF; else echo "&nbsp;";?></td>
  356.       <td><?php if (isset($txtMKGF)) echo $txtMKGF; else echo "&nbsp;";?></td>
  357.       <td><?php if (isset($txtRHF)) ech