|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2001-02-10 14:32 UTC] jimw@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 11:00:01 2025 UTC | 
hi to all and many thanks if you can tell me something... we dump a little mysql database (90000 records) via php3-mysql we write the records in an ascii file in order to get it via ftp in a html frontend page we can select some buttons before the sql query is launched.. these buttons are recuperated in the php code in a little loop where we compose the name of the variables... our problem is that we waste many many time (45sec) inside the main loop (while $row) just to make the result line /* $bouton=strtok($liste," "); while($bouton) { $ligne=$ligne.$row["$bouton"]."\t"; $bouton = strtok(" "); } */ if we comment these lines (and we hardcode the composition of the result line) above we gain half the total time am i clear? thanks if you have a solution? or maybe we touch the limit of the system? ML --------- to make a list of selected buttons--------- $liste=""; for ($k=1; $k<21; $k++) { $s="b".$k; $long=strlen(${$s}); if ($long>0) { $liste=$liste.${$s}." " ; } } chop($liste); --------to dump the selected colums-------- while ($row ) /*# 90000 records*/ { /* $bouton=strtok($liste," "); while($bouton) { $uneligne=$uneligne.$row["$bouton"]."\t"; $bouton = strtok(" "); } */ /* we gain many time if the above lines are comented ... why?*/ $uneligne=$row["Latitude"] ." ". $row["Longitude"] ." ". $row["Date"] ." ". $row["ProfMes"] ." ". $row["Temp"] ." ". $row["Cond"] ." ". $row["TempPot"] ." ". $row["Sal"] ." ". $row["Sig0"] ." ". $row["Sig2"] ." ". $row["Tur"] ." ". $row["Fluo"] ." ". $row["O2d"] . "\n" ; $uneligne=$uneligne."\n";