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 :

Amélioration du code


Sujet :

PHP & Base de données

  1. #1
    Membre éclairé
    Homme Profil pro
    Étudiant
    Inscrit en
    Février 2008
    Messages
    391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2008
    Messages : 391
    Par défaut Amélioration du code
    Bonjour,

    Voila j'ai un peu honte de moi pour le code produit alors c'est pour cela que je fais appel à votre aide !

    J'ai des boucles for partout lol !

    Voici mon code et je laisse place aux critiques et aux aides car je veux vraiment l'améliorer mais je sais pas comment

    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
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    $tabSuite1 = (isset($_POST['suite1']))?$_POST['suite1']:null; 
    	// bouclons sur le tableau qui a été transmis et affichons les valeurs sélectionnées 
    	if (!empty($tabSuite1))
    	{ 
    		foreach($tabSuite1 as $cle => $id1)
    		{ 			
    		OpenTable();
    		$query="SELECT login FROM gpoint_personne WHERE dept='$id1'";
    		$result=mysql_query($query);
    		$nb=mysql_numrows($result);
     
    		echo "<div align='center'>";
    		echo "<br />";
    		echo "<table cellspacing='1' width='100%'>";
    		echo "<tr>";
    			$query_departement="select descriptif_departement from gpoint_departement where lettre_departement='$id1'";
    			$result_departement=mysql_query($query_departement);
    			$nom_departement=mysql_result($result_departement,"descriptif_departement");
    		echo "<h6 style='color:red'>$nom_departement</h6>";
    		echo "</tr>";
    		echo "<tr  bgcolor='#B0C4DE' ALIGN='center' valign='middle'  >";
    		//l'id
    		echo "<td>";
    		echo "<h6>Technicien / Personnel</h6></a>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Product</h6>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Formation</h6></a>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Qualite</h6></a>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Délég. CE-DP</h6>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Divers N.Prod</h6></a>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Admin. Génér.</h6></a>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>RTT Perso</h6></a>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>RTT Direct</h6></a>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Congés Légaux</h6></a>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Congés Evt Fam</h6>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Congés Ss solde</h6>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Maladie</h6>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Accidt de trav</h6>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Abs non justifiée</h6>";
    		echo "</td>";
     
    		echo "<td>";
    		echo "<h6>Total</h6>";
    		echo "</td>";
    		echo "</tr>";
     
    		for($i=0;$i<$nb;$i++){
    		$nom=mysql_result($result,$i,"login");
    		// ici le test de couleur pour modifier la couleur de la ligne
    		if($couleur==1){
    		echo "<tr bgcolor='#DDDDDD' ALIGN='center'>";
    		$couleur=0;
    		}
    		else{
    		echo "<tr bgcolor='#FFEBCD' ALIGN='center'>";
    		$couleur=1;
    		}
    		echo "<td>";
    		echo "$nom ";
    		echo "</td>";
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='Product'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='Format'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='Qualite'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='Deleg'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='Divers'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='Admin'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='RTT-P'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='RTT-D'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='CL'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='CEF'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='CS'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='MAL'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='AT'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td>";
    		$query_rtt="select temps_pointage from gpoint_pointage where login='$nom' and dossier_pointage='AI'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"temps_pointage");
    		echo "$rtt_p";
    		echo "</td>";
    		}
     
    		echo "<td bgcolor='#E70739'>";
    		$query_rtt="select SUM(temps_pointage) from gpoint_pointage where login='$nom'";
    		$result_rtt=mysql_query($query_rtt);
    		$nb_rtt=mysql_numrows($result_rtt);
    		for($j=0;$j<$nb_rtt;$j++)
    		{
    		$rtt_p=mysql_result($result_rtt,$j,"SUM(temps_pointage)");
    		echo "$rtt_p";
    		echo "</td>";
    		}
    		echo "</tr>";
    		}
     
     
    		echo "<tr bgcolor='#E70739' align='center'>";
     
    			echo "<td>";
    				echo "Total";
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='Product'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='Format'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='Qualite'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='Deleg'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='Divers'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='Admin'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='RTT-P'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='RTT-D'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='CL'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='CEF'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='CS'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='MAL'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='AT'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    			echo "<td>";
    				$query_total="select SUM(temps_pointage) from gpoint_pointage where dossier_pointage='AI'";
    				$result_total=mysql_query($query_total);
    				$nb_total=mysql_numrows($result_total);
    				for($k=0;$k<$nb_total;$k++)
    				{
    					$total=mysql_result($result_total,$k,"SUM(temps_pointage)");
    					echo "$total";
    				}
    			echo "</td>";
     
    		echo "</tr>";
     
    		echo "</table>";
    		echo "</div>";

  2. #2
    Membre Expert Avatar de riete
    Homme Profil pro
    DevWeb - Oléiculteur
    Inscrit en
    Avril 2006
    Messages
    1 193
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France

    Informations professionnelles :
    Activité : DevWeb - Oléiculteur
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2006
    Messages : 1 193
    Par défaut
    As ta place je me pencherais sur la programmation orienté objet.

  3. #3
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    C'est vraiment affreux

    Regarde par exemple comment on peut, en une seule requete recolter et classer tous les resultats :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
    // une seul requete qui prend tous les résultats
    $query="SELECT dossier_pointage ,temps_pointage FROM gpoint_pointage WHERE login='$nom'";
    $result=mysql_query($query);
    // on parcours sans avoir besoin de regarder le nombre de ligne
    while ($row = mysql_fetch_row($result)) {
        // on range dans un tableau classé par dossier_pointage et par nom
        $data[$row[0]][$nom] .= $row[1];
     
    }
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  4. #4
    Membre Expert Avatar de riete
    Homme Profil pro
    DevWeb - Oléiculteur
    Inscrit en
    Avril 2006
    Messages
    1 193
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France

    Informations professionnelles :
    Activité : DevWeb - Oléiculteur
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2006
    Messages : 1 193
    Par défaut
    Tu voulais surement dire mysql_fetch_row ? car je ne connais pas mysql_fetch_num
    Citation Envoyé par sabotage Voir le message
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    ;
    // on parcours sans avoir besoin de regarder le nombre de ligne
    while ($row = mysql_fetch_num($result)) {
        // on range dans un tableau classé par dossier_pointage et par nom
        $data[$row[0]][$nom] .= $row[1];
     
    }
    Pour un classement, pourquoi ne pas utiliser le moteur de BDD ? un bon ORDER BY est bien plus rapide que php ?

  5. #5
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    Tu voulais surement dire mysql_fetch_row ? car je ne connais pas mysql_fetch_num
    oui, je melange avec PDO

    Pour un classement, pourquoi ne pas utiliser le moteur de BDD ? un bon ORDER BY est bien plus rapide que php ?
    Parce qu'il ne s'agit pas seulement d'ordonner mais de rassembler tous les elements qui ont le meme dossier_pointage.
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  6. #6
    Invité
    Invité(e)
    Par défaut
    Et pour le tableau
    "Affichage de données dans un tableau HTML" :
    http://j-reaux.developpez.com/tutori...-tableau-html/

  7. #7
    Membre Expert Avatar de riete
    Homme Profil pro
    DevWeb - Oléiculteur
    Inscrit en
    Avril 2006
    Messages
    1 193
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France

    Informations professionnelles :
    Activité : DevWeb - Oléiculteur
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2006
    Messages : 1 193
    Par défaut
    Citation Envoyé par sabotage Voir le message
    oui, je melange avec PDO
    Je ne sais pas ce qu'est PDO, donc la question est réglée
    Citation Envoyé par sabotage Voir le message
    Parce qu'il ne s'agit pas seulement d'ordonner mais de rassembler tous les elements qui ont le meme dossier_pointage.
    Ceci dit, Devilju69 devrait sérieusement se poser des questions d'analyse et de structure de BDD. Je pense qu'il y a une faille certaine à ce niveau.
    Pour ce genre d'application la majeur partie des traitements sont réalisés au niveau du serveur de BDD.
    Attendons sa réaction.
    A+

Discussions similaires

  1. Amélioration de code
    Par Devilju69 dans le forum Langage
    Réponses: 3
    Dernier message: 07/10/2008, 15h01
  2. Optimisations et Améliorations de code
    Par womannosky dans le forum Langage
    Réponses: 19
    Dernier message: 02/07/2008, 15h05
  3. [Optimisation]Peut-on améliorer ce code ?
    Par progfou dans le forum Algorithmes et structures de données
    Réponses: 6
    Dernier message: 09/08/2007, 15h43
  4. [Tableaux] Amélioration de code (if)
    Par Sir Tengu dans le forum Langage
    Réponses: 3
    Dernier message: 24/12/2006, 00h26
  5. [Sécurité] Comment amélioré mon code ?
    Par Nadd dans le forum Langage
    Réponses: 14
    Dernier message: 03/03/2006, 20h13

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