IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PHP & Base de données Discussion :

Optimiser ma page


Sujet :

PHP & Base de données

  1. #1
    Membre confirmé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Décembre 2006
    Messages
    61
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Indre et Loire (Centre)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2006
    Messages : 61
    Par défaut Optimiser ma page
    Bonjour, J'ai un gros problème la page dont je vous ai collé le code et mis en pièce jointe est très longue à afficher, je voulais savoir pourquoi, car franchement je vois pas ce qui pourrai la ralentir.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Philatours</title>
    <style type="text/css" media="screen">@import url(css/style.css);</style>
    <style type="text/css" media="screen">@import url(css/menu.css);</style>
    <script type="text/javascript" language="javascript" src="javascript/menu.js"><!-- --></script>
    <script type="text/javascript" language="javascript">
    <!--
    function confirmation(produit)
        {
            if (confirm('Attention vous allez supprimer '+produit))
                {
                    return true;
                    alert("La suppression de "+produit+" vient d'être effectuée");
                } 
            else 
                {
                    alert('La suppression de '+produit+' à été annulée');
                    return false;
                }
        }
    function popant(nUrl,nNom)
    {
      var options = 'width=400,height=70,top=100,left=250,scrollbars=no,toolbar=no, menubar=no, location=0, resizable=no, status=no';
     
      // Ouvrir le popUp
      ant=window.open(nUrl,nNom,options);
     
      // Forcer le focus sur un PopUp déjà ouvert
      if(ant.window.focus)
          {
            ant.window.focus();
        }
    }
    -->
    </script>
    </head>
     
    <body>
    <?php
    $page_start = microtime();
    ?>
    <div id="menucentre">
    <div id="menu">
        <dl>
            <dt style="border-left:1px solid #ccc;" onMouseOver="javascript:montre();"><a href="index.php" title="Retour à l'accueil">Accueil</a></dt>
        </dl>
     
        <dl onMouseOver="javascript:montre('smenu1');" onMouseOut="javascript:montre();">            
            <dt>Rechercher</dt>
                <dd id="smenu1">
                    <ul>
                        <li><a href="searchC.php" onClick="javascript:montre();">clients</a></li>
                        <li><a href="searchP.php" onClick="javascript:montre();">produits</a></li>
                        <li><a href="searchPY.php" onClick="javascript:montre();">pays</a></li>
                        <li><a href="searchTY.php" onClick="javascript:montre();">types</a></li>
                        <li><a href="searchVPN.php" onClick="javascript:montre();">VPN</a></li>
                        <li><a href="searchVO.php" onClick="javascript:montre();">VO</a></li>
                    </ul>
                </dd>
        </dl>
     
     
        <dl onMouseOver="javascript:montre('smenu2');" onMouseOut="javascript:montre();">            
            <dt>Ajouter</dt>
                <dd id="smenu2">
                    <ul>
                        <li><a href="newclient.php" onClick="javascript:montre();">clients</a></li>
                        <li><a href="newproduit.php" onClick="javascript:montre();">produits</a></li>
                        <li><a href="newpays.php" onClick="javascript:montre();">pays</a></li>
                        <li><a href="newtype.php" onClick="javascript:montre();">types</a></li>
                        <li><a href="newVPN.php" onClick="javascript:montre();">VPN</a></li>
                        <li><a href="newVO.php" onClick="javascript:montre();">VO</a></li>
                    </ul>
                </dd>
        </dl>
     
        <dl onMouseOver="javascript:montre('smenu3');" onMouseOut="javascript:montre();">            
            <dt>VPN</dt>
                <dd id="smenu3">
     
                    <ul>
                    <li><a href="commandevpn.php" onClick="javascript:montre();">commander</a></li>
                    <li><a href="actionVPN.php" onClick="javascript:montre();">Action</a></li>
                    <li><a href="vpnzero.php" onClick="javascript:montre();">Remise à zéro</a></li>
                    </ul>
                </dd>
        </dl>
     
        <dl onMouseOver="javascript:montre('smenu4');" onMouseOut="javascript:montre();">            
            <dt>VO</dt>
                <dd id="smenu4">
                    <ul>
                    <li><a href="commandevo.php" onClick="javascript:montre();">commander</a></li>
                    <li><a href="actionVO.php" onClick="javascript:montre();">Action</a></li>
                    <li><a href="vozero.php" onClick="javascript:montre();">Remise à zéro</a></li>
                    </ul>
                </dd>
        </dl>
        <dl onMouseOver="javascript:montre('smenu5');" onMouseOut="javascript:montre();">            
            <dt>Autres</dt>
                <dd id="smenu5">
                    <ul>
                    <li><a href="impression.php" onClick="javascript:montre();">Impression</a></li>
                    <li><a href="switch.php" onClick="javascript:montre();">Switch</a></li>
                    <li><a href="suppIV" onClick="javascript:montre();">Supprimer des IV</a></li>
                    </ul>
                </dd>
        </dl>
    </div>
    </div>
    <table width="100%" cellpadding="0" cellspacing="10" border="0" onClick="javascript:montre();">
    <tr>
    <td id="gro" align="center" valign="top" onClick="javascript:montre();" >
    <?php
    echo '<h2><span class="red">'.$_REQUEST['type'].' Nº'.$_REQUEST['num'].'</span> activée</h2>';
    ?>
    <?php
    require('sql/conf.php');
    require('gomonth.php');
    if(isset($_POST['submit']))
        {    
            $time_before = microtime();
            $mode = $_POST['mode'];
            $critere = $_POST['critere'];
     
            $row['id_p'] = array();
            /*$req = mysql_query("SELECT count(id_p) FROM `produits` P 
            LEFT JOIN `pays` PA ON P.pays = PA.code_p 
            LEFT JOIN `types` T ON P.type = T.code_t 
            WHERE P.checked = '".$_REQUEST['type']."' 
            AND P.vente = '".$_REQUEST['num']."' 
            AND P.".$mode." >= '".$critere."'");
            $max = (array_pop(mysql_fetch_row($req)));*/
            $max = 100;
     
            $select = "
            SELECT * FROM `produits` P 
            LEFT JOIN `pays` PA ON P.pays = PA.code_p 
            LEFT JOIN `types` T ON P.type = T.code_t 
            WHERE P.checked = '".$_REQUEST['type']."' 
            AND P.vente = '".$_REQUEST['num']."' 
            AND P.".$mode." >= '".$critere."' 
            ORDER BY ".$mode." ASC LIMIT 0,1";
            //echo 'requête executée<br>'.$select.'<br>';
            $query = mysql_query($select)or die ('Erreur ligne 136<br>'.$select.'<br>'.mysql_error());
            $time_after = microtime();
            $time = $time_after - $time_before;
            echo '<br>Requête exécuté en '.$time.' sec<br>';
     
    $table_before = microtime();
    while($row = mysql_fetch_assoc($query)){
    ?>            
    <fieldset style="width:900px;">
    <table id="gro" width="900" cellpadding="0" cellspacing="15" border="0">
    <tr>
    <td colspan="2" align="left"><span class="FPbleue"><?php  echo  $row['checked'].'</span> <span class="FProuge">Nº'.$row['vente'];  ?></span></td>
    <td colspan="2" align="center">
    <span class="FPbleue">Saisie </span><span class="FPnoire">Nº<?php  echo  $row['saisie'];  ?></span>
    </td>
    <td colspan="2" align="right">
    <span class="FPbleue">Lot </span><span class="FProuge">Nº<?php  echo  $row['lot'];  ?></span>
    </td>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">Enregistré  le</td>
    <td align="center" class="FProugeMINI"><?php  echo  toMonth($row['entree']);?></td>
    <td colspan="4">&nbsp;</td>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">Propriétaire</td>
    <td align="center" class="FProugeMINI"><?php  echo  $row['proprietaire'];?></td>
    <td align="right" class="FPbleueMINI">Taux</td>
    <td align="center" class="FProugeMINI"><?php  echo  $row['percent'].'%';?></td>
    <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">pays</td>
    <td align="center" class="FProugeMINI"><?php  echo $row['nom_pays'];?></td>
    <td align="right" class="FPbleueMINI">Type</td>
    <td align="center" class="FProugeMINI"><?php  echo $row['nom_type'];?></td>
    <td align="right" class="FPbleueMINI">Image N&amp;B</td>
    <?php if($row['img']=='Ph') echo '<td align="center" class="FProugeMINI">OUI</td>'; else echo '<td align="center" class="FProugeMINI">NON</td>'; ?>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">Nº  Yvert</td>
    <td align="center" class="FProugeMINI"><?php  echo  $row['yvert'];?></td>
    <td align="right" class="FPbleueMINI">Qualité</td>
    <td align="center" class="FProugeMINI"><?php if($row['etat2']!=''){echo $row['etat'].'/'.$row['etat2'];}else{echo $row['etat'];}?></td>
    <td align="right" class="FPbleueMINI">Image Couleur</td>
    <?php if($row['img']=='PhC') echo '<td align="center" class="FProugeMINI">OUI</td>'; else echo '<td align="center" class="FProugeMINI">NON</td>'; ?>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">Cote</td>
    <td align="center" class="FProugeMINI"><?php  echo  $row['cote'].'&euro';?></td>
    <td align="right" class="FPbleueMINI">En stock</td>
    <td align="center" class="FProugeMINI"><?php echo $row['stock'];?></td>
    <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">Prix de vente</td>
    <td align="center" class="FProugeMINI"><?php echo $row['pdv'].'&euro';?></td>
    <td align="right" class="FPbleueMINI">Acheteur</td>
    <td align="center" class="FProugeMINI" colspan="3"><?php echo $row['acheteur'];?></td>
    </tr>
    <tr>
    <td colspan="6" align="left" class="FPbleueMINI">Description</td>
    </tr>
    <tr>
    <td colspan="6" align="left" class="FPnoireMINI">
    <?php echo $row['descrip'];?>
    </td>
    </tr>
    </table>
    </fieldset>
    <?php
    }
    ?>
    <br />
    Rechercher un autre produit : <br>
    <form name="searchproduit" method="post">
    <select name="mode" class="aspectselectbox">
        <option value="lot">Nº de lot</option>
        <option value="saisie">Nº de saisie</option>
        <option value="acheteur">Acheteur</option>    
        <option value="pays">Code pays</option>
        <option value="type">Code type</option>
        <option value="yvert2">Nº Yvert</option>
        <option value="proprietaire">Propriétaire</option> </select>
     Critère <input type="text" name="critere" class="aspecttypetext">
     <input type="submit" name="submit" value="Rechercher" class="aspectbutton">
     </form>    
    <?php
    $table_after = microtime();
    $table = $table_after - $table_before;
    echo 'tableau affiché en '.$table.' sec<br>';            
        }
    else
    {
    ?>
    <center>Moteur de RECHERCHE POUR LES PRODUITS :</center>
    <p>Une fois que vous aurez trouvé votre produit vous pourrez soit le modifier soit le supprimer.</p>
    <form name="searchproduit" method="post">
    <select name="mode" class="aspectselectbox">
        <option value="lot">Nº de lot</option>
        <option value="saisie">Nº de saisie</option>
        <option value="acheteur">Acheteur</option>    
        <option value="pays">Code pays</option>
        <option value="type">Code type</option>
        <option value="yvert2">Nº Yvert</option>
        <option value="proprietaire">Propriétaire</option> </select>
     Critère <input type="text" name="critere" class="aspecttypetext">
     <input type="submit" name="submit" value="Rechercher" class="aspectbutton">
     </form>        
    <?php
    }
    ?>
    </td>
    <?php
    if(isset($_POST['submit']))
        {
    ?>
    <td id="gro" align="left" valign="top" onClick="javascript:montre();">
    <table cellpadding="5" cellspacing="0" border="0">
    <tr>
    <td align="left">
    <?php
    echo '<form name="PHNB" method="get">';?>
    <!--Photo noir et blanc-->
    <input type="button" class="aspectbuttonPH" name="subph" value="Photo" onClick="popant('http://<?php echo getenv("HTTP_HOST");?>/maj.php?idproduit=<?php echo $row['id_p']; ?>&photo=noirblanc','maj');">
    <!--Photo couleur-->
    <input type="button" class="aspectbuttonPH" name="subphC" value="Photo Couleur" onClick="popant('http://<?php echo getenv("HTTP_HOST");?>/maj.php?idproduit=<?php echo $row['id_p']; ?>&photo=couleur','maj');">
    <!--Photo annulation-->
    <input type="button" class="aspectbuttonANNUL" name="subann" value="Annulation Photo" onClick="popant('http://<?php echo getenv("HTTP_HOST");?>/maj.php?idproduit=<?php echo $row['id_p']; ?>&photo=annul','maj');">
    <?php
    echo'
    </form>';
    ?>
    </td>
    </tr>
    <tr>
    <td align="left">
    <?php
    $actualP = 0;
    $preced = $actualP-1;
    if($preced<0)
        {
        echo'
        <form name="null" method="post">
        <input type="button" class="aspectbuttonEND" value="Précédent">
        </form>';
        }
        if($preced>=0)
        {
        echo '
        <form name="preced" method="get" action="AdminProduit.php">
        <input type="hidden" name="max" value="'.$max.'">
        <input type="hidden" name="mode" value="'.$mode.'">
        <input type="hidden" name="critere" value="'.$critere.'">
        <input type="hidden" name="actualP" value="'.$preced.'">
        <input type="submit" class="aspectbutton" value="Précédent">
        </form>';
        }
    ?>
    </td></tr><tr><td align="left"><?php
    $suivant = $actualP+1;
    if($suivant>=$max)
        {
        echo'
        <form name="null" method="post">
        <input type="button" class="aspectbuttonEND" value="Suivant">
        </form>';
        }
    if($suivant<$max)
    {
    echo ' 
    <form name="suivant" method="get" action="AdminProduit.php">
    <input type="hidden" name="max" value="'.$max.'">
    <input type="hidden" name="actualP" value="'.$suivant.'">
    <input type="hidden" name="mode" value="'.$mode.'">
    <input type="hidden" name="critere" value="'.$critere.'">
    <input type="submit" class="aspectbutton" value="Suivant">
    </form>';
    }
    ?></td></tr><tr><td align="left"><?php
    //Modifier
    echo '<form name="modifierleProduit" method="post" action="AdminProduit.php" target="_blank">
    <input type="hidden" name="idproduit" value="'.$row['id_p'].'">
    <input type="submit" class="aspectbutton" name="modifproduit" value="Modifier la fiche Produit">
    </form>';
    ?></td></tr><tr><td align="left"><?php
    //Suprimer
    echo '<form name="supressionproduit" method="post" action="AdminProduit.php">
    <input type="hidden" name="idproduit" value="'.$row['id_p'].'">
    <input type="submit" class="aspectbutton" name="supprod" value="Supprimer ce Produit" onclick="return confirmation(\''.$row['yvert'].' '.$row['descrip'].'\');">
    </form>';
    ?></td></tr><tr><td align="center"><?php
    echo'<a class="liena" href="searchP.php">Autre Recherche</a>';
     
    ?>
    </td>
    </tr>
    </table>
    </td>
    <?php
        }
    ?>
    </tr>
    </table>
    <?php
    $page_end = microtime();
    $page = $page_end - $page_start;
    echo 'la page c\'est affichée en '.$page.' sec';
    mysql_close($link);
    ?>
    </body>
    </html>
    merci sniiiif
    Fichiers attachés Fichiers attachés

  2. #2
    jnore
    Invité(e)
    Par défaut
    ca fait beaucoup à analyser !!!

    Il faudrait déjà faire un "afficher la source" et regarder s'il n'y a pas des messages d'erreur!

    Bien souvent les lenteurs proviennent d'une boucle mal faite.

  3. #3
    Membre confirmé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Décembre 2006
    Messages
    61
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Indre et Loire (Centre)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2006
    Messages : 61
    Par défaut
    Non il y a aucune erreur même pas une erreur js ou css quant à une erreur php si y'en avait une ça me le signalerai et le script ne s'exécuterait pas.


    Une question es ce que la lenteur peux provenir du faite que je vérifie deux la même condition car en début de fichier je vérifie $_post['submit'] avec un isset et je fait de pareil 350 lignes après, Sinon au niveau de la requete SQL elle est optimisé ont peut pas faire plus rapide (~0.07sec) vu la grosseur des tables que j'interroge.

    Voilà

    Merci

  4. #4
    jnore
    Invité(e)
    Par défaut
    Fais attention, certaines erreur php n'apparaissent pas toujours à l'écran !
    Alors que dans le fichier source elles y aparraissent!
    A ta place, j'y ferai un petit tour quand même.

    Interroge-toi aussi pour savoir à quel moment est apparu le ralentissement.
    Après insertion de tel ou tel code?

    Si tu ne vois pas, il faut y aller au coup par coup, càd, retirer des portions de code et voir les évolutions de chargement.

    C'est pas facile de dépanner en aveugle !!!

  5. #5
    Membre confirmé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Décembre 2006
    Messages
    61
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Indre et Loire (Centre)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2006
    Messages : 61
    Par défaut
    Ouep mais bon ce que je ne comprends c'est que si j'avais une erreur php ma page ne s'exécuterait pas ou j'aurai au moins un warning non ?

  6. #6
    Membre confirmé Avatar de rougedragon
    Inscrit en
    Septembre 2006
    Messages
    132
    Détails du profil
    Informations personnelles :
    Âge : 55

    Informations forums :
    Inscription : Septembre 2006
    Messages : 132
    Par défaut
    Salut,

    Je ne suis pas fortiche en programmation mais il me semble que tu as des scripts que tu pourrais exécuter dans d'autre pages. Sinon le serveur va d'abord parcourir tes scripts, tenter de voir si les conditions pour les exécuter sont réunies ou pas .... c'est là que tu perds du temps.

    Je pense aux fonctions supprimer, modifier... que tu pourrais faire tourner à part.


    A plus (et dite moi si je suis à l'ouest)

  7. #7
    Membre confirmé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Décembre 2006
    Messages
    61
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Indre et Loire (Centre)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2006
    Messages : 61
    Par défaut
    Bonjour,

    Non j'ai trouvé j'ai suivis le conseil de jnore j'ai enlever des bouts de code et il c'est avéré que c'était ma requête SQL et mon while qui m'étais du temps d'exécution voici la partie de code que j'ai modifié :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
     
    if(isset($_POST['submit']))
        {    
            $mode = $_POST['mode'];
            $critere = $_POST['critere'];
            $_SESSION['actualP'] = array();
     
            $selectID = "
            SELECT id_p FROM `produits` P 
            WHERE P.checked = '".$_SESSION['type']."' 
            AND P.vente = '".$_SESSION['num']."' 
            AND P.".$mode." >= '".$critere."' 
            ORDER BY ".$mode;
     
            $queryID = mysql_query($selectID)or die ('Erreur ligne 135<br>'.$selectID.'<br>'.mysql_error());
     
            $position = 0;
            $counter = 0;
            while($rowID=mysql_fetch_object($queryID))
                {
                    $_SESSION['actualP'][] =  $rowID -> id_p;                
                    $counter++;
                }
     
            $select = "
            SELECT * FROM `produits` P 
            LEFT JOIN `pays` PA ON P.pays = PA.code_p 
            LEFT JOIN `types` T ON P.type = T.code_t 
            WHERE P.id_p = '".$_SESSION['actualP'][0]."'";
     
            $query = mysql_query($select)or die ('Erreur ligne 135<br>'.$select.'<br>'.mysql_error());
    while($tab=mysql_fetch_object($query)){
    $yvert = $tab -> yvert;
    $descrip = $tab -> descrip;
    ?>            
    <fieldset style="width:900px;">
    <table id="gro" width="900" cellpadding="0" cellspacing="15" border="0">
    <tr>
    <td colspan="2" align="left"><span class="FPbleue"><?php  echo  $tab -> checked.'</span> <span class="FProuge">Nº'.$tab -> vente;  ?></span></td>
    <td colspan="2" align="center">
    <span class="FPbleue">Saisie </span><span class="FPnoire">Nº<?php  echo  $tab -> saisie;  ?></span>
    </td>
    <td colspan="2" align="right">
    <span class="FPbleue">Lot </span><span class="FProuge">Nº<?php  echo  $tab -> lot;  ?></span>
    </td>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">Enregistré  le</td>
    <td align="center" class="FProugeMINI"><?php  echo  toMonth($tab -> entree);?></td>
    <td colspan="4">&nbsp;</td>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">Propriétaire</td>
    <td align="center" class="FProugeMINI"><?php  echo  $tab -> proprietaire;?></td>
    <td align="right" class="FPbleueMINI">Taux</td>
    <td align="center" class="FProugeMINI"><?php  echo  $tab -> percent.'%';?></td>
    <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">pays</td>
    <td align="center" class="FProugeMINI"><?php  echo $tab -> pays;?></td>
    <td align="right" class="FPbleueMINI">Type</td>
    <td align="center" class="FProugeMINI"><?php  echo $tab -> type;?></td>
    <td align="right" class="FPbleueMINI">Image N&amp;B</td>
    <?php if($tab -> img=='Ph') echo '<td align="center" class="FProugeMINI">OUI</td>'; else echo '<td align="center" class="FProugeMINI">NON</td>'; ?>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">Nº  Yvert</td>
    <td align="center" class="FProugeMINI"><?php  echo  $tab -> yvert;?></td>
    <td align="right" class="FPbleueMINI">Qualité</td>
    <td align="center" class="FProugeMINI"><?php if($tab -> etat2!=''){echo $tab -> etat.'/'.$tab -> etat2;}else{echo $tab -> etat;}?></td>
    <td align="right" class="FPbleueMINI">Image Couleur</td>
    <?php if($tab -> img=='PhC') echo '<td align="center" class="FProugeMINI">OUI</td>'; else echo '<td align="center" class="FProugeMINI">NON</td>'; ?>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">Cote</td>
    <td align="center" class="FProugeMINI"><?php  echo  $tab -> cote.'&euro';?></td>
    <td align="right" class="FPbleueMINI">En stock</td>
    <td align="center" class="FProugeMINI"><?php echo $tab -> stock;?></td>
    <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
    <td align="right" class="FPbleueMINI">Prix de vente</td>
    <td align="center" class="FProugeMINI"><?php echo $tab -> pdv.'&euro';?></td>
    <td align="right" class="FPbleueMINI">Acheteur</td>
    <td align="center" class="FProugeMINI" colspan="3"><?php echo $tab -> acheteur;?></td>
    </tr>
    <tr>
    <td colspan="6" align="left" class="FPbleueMINI">Description</td>
    </tr>
    <tr>
    <td colspan="6" align="left" class="FPnoireMINI">
    <?php echo $tab -> descrip;?>
    </td>
    </tr>
    </table>
    </fieldset>
    <br />
    Rechercher un autre produit : <br>
    <form name="searchproduit" method="post">
    <select name="mode" class="aspectselectbox">
        <option value="lot">Nº de lot</option>
        <option value="saisie">Nº de saisie</option>
        <option value="acheteur">Acheteur</option>    
        <option value="pays">Code pays</option>
        <option value="type">Code type</option>
        <option value="yvert2">Nº Yvert</option>
        <option value="proprietaire">Propriétaire</option> </select>
     Critère <input type="text" name="critere" class="aspecttypetext">
     <input type="submit" name="submit" value="Rechercher" class="aspectbutton">
     </form>    
    <?php            
        }
    }
    Voilà

    Merci pour votre aide

Discussions similaires

  1. optimisation chargement page
    Par omelhor dans le forum Performance Web
    Réponses: 6
    Dernier message: 25/08/2012, 12h07
  2. Comment optimiser une page Web pour un bon référencement ?
    Par Sayrus dans le forum Référencement
    Réponses: 6
    Dernier message: 06/03/2008, 15h54
  3. Tutoriel SEO : Introduction et bonnes pratiques pour l'optimisation de pages Web
    Par Community Management dans le forum Référencement
    Réponses: 0
    Dernier message: 06/07/2006, 00h03
  4. Introduction à la SEO (optimisation de pages Web)
    Par Yogui dans le forum Référencement
    Réponses: 0
    Dernier message: 12/05/2006, 23h21

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo