lizard Posted November 16, 2006 Report Share Posted November 16, 2006 Rekur scripts, diezgan vienakrsh, kas no datunbazes izvada datus stabinja uz leju. Vajag uztaisit ta lai shunu krasojums butu viens pec viena(tumshi dzeltens, gailshi dzletens) to ari es itka izdariju, bet vinsh visas shunas tabula kraso viena krasa, kapec ta. Kur varetu but kljuda? $query = "SELECT * FROM products WHERE categoryID='$select'"; $result = mysql_query($query); $i = 0; Print("<table width='524' cellpadding='3' cellspacing='0' border='0' class='cat_table'>"); while(($row = mysql_fetch_row($result)) !== false) { $i++; $i = 0; if ($i % 1) { $bgcolor = "bgcolor='#F7FFD9'"; } else { $bgcolor = "bgcolor='#FDFFF7'"; } Print("<tr $bgcolor onmouseover='this.style.backgroundColor='#D4EBFF';' onmouseout='this.style.backgroundColor='#F7FFD9';'>"); Print("<td class='cat_item' width='16' height='16'><img src='img/zoom.gif' border='0'></td>"); Print("<td class='cat_item' width='440'><a href='index.php?zoom=".$row[0]."$link' class='cat_link'>".$row[1]."</td>"); Print("<td class='cat_item' width='60'>".$row[3]." Ls</td>"); Print("<td class='cat_item' width='34' align='middle'><a href='#' class='cat_link'>Groza</a></td>"); Print("</tr>"); } print "</table>"; Link to comment Share on other sites More sharing options...
Delfins Posted November 16, 2006 Report Share Posted November 16, 2006 ...pēdiņās Link to comment Share on other sites More sharing options...
lizard Posted November 16, 2006 Author Report Share Posted November 16, 2006 Nuja pedinjas nebija pareizi nemaz nepamaniju. Nu tagad itka viss stils strada bet vienalga nestrada tas ka tabulu krasojums viss krasojas viena krasa Pieljauju ka kljuda ir ieksh $i maniiga bet nezinu tieshi. Link to comment Share on other sites More sharing options...
andrisp Posted November 16, 2006 Report Share Posted November 16, 2006 $i++; $i = 0; Kas ta te ? :) Link to comment Share on other sites More sharing options...
lizard Posted November 16, 2006 Author Report Share Posted November 16, 2006 Es nezinu, es to uzrakstiju skatoties pec cita scripta kura ari bija tapat. Link to comment Share on other sites More sharing options...
bubu Posted November 16, 2006 Report Share Posted November 16, 2006 Paprasi pats sev: Ko nozīmē $i Ko nozīmē $i++ Ko nozīmē $i=0 Ja kaut uz vienu uz šiem jautājumiem nespēj atbildēt, tad ver vaļā php manuāli un lasi, nevis gaidi, kad citi labos tavus skriptus. Un tu vēl php skriptu ātrumus optimizēt sataisījies... phe. Link to comment Share on other sites More sharing options...
lizard Posted November 16, 2006 Author Report Share Posted November 16, 2006 (edited) Nerubiju kam forums domats ja ne palidzeshanai... A par to scriptu optimizeshanu, ko darit ja serveris nevelk... Edited November 16, 2006 by lizard Link to comment Share on other sites More sharing options...
bubu Posted November 16, 2006 Report Share Posted November 16, 2006 Prasīt palīdzību tu vari, ja pats saproti, ko esi uzrakstījis. Ja tu nesaproti, ko esi uzrakstījis, tad kāda jēga tev ko stāstīt? Link to comment Share on other sites More sharing options...
lizard Posted November 17, 2006 Author Report Share Posted November 17, 2006 Jega tada lai es varetu tuprinat darbu jo tagad biku iebremzejies esu. Link to comment Share on other sites More sharing options...
Recommended Posts