Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][MYSQL]Pętla while i przekroczony limit
Mlodycompany
post 7.07.2008, 09:31:55
Post #1





Grupa: Zarejestrowani
Postów: 910
Pomógł: 44
Dołączył: 20.02.2008
Skąd: Łódź

Ostrzeżenie: (20%)
X----


Witam. Mam taki kodzik
  1. <?php
  2. include('config.php');
  3. $query = query('kategorie', "`ID` = '".$inc[1]."'");
  4. $row = mfa($query);
  5. $query2 = query('podkategorie', "`id_kat` = '".$inc[1]."'");
  6. print_r($inc);
  7. show('<html>
  8. <head>
  9. <meta http-equiv="content-type" content="text/html; charset=iso-8859-2" />
  10. <title>'.$row[$lang].'</title>
  11. <link rel="stylesheet" type="text/css" href="'.$URL.'/style.css">
  12. </head>');
  13. include('logo.php');
  14. show('
  15. <table class="table_category" align="center">
  16. <tr>
  17. <th class="header" align="left">&nbsp;&nbsp;<a href="'.$URL.'/" class="aheader">'.INDEX.'</a>&nbsp;&nbsp;>>&nbsp;&nbsp;<a href="'.$URL.'/category/'.$row[0].'/" class="aheader">'.$row[$lang].'</a></th>
  18. </tr>
  19. <tr>
  20. <th>
  21. <table class="category">
  22. <tr>
  23. <th class="header2">'.UNDERCAT.'</th>
  24. </tr>
  25. ');
  26. $i = 0;
  27. while($row = mfa($query2)){
  28. $i++;
  29. $class = $i % 2;
  30. $query1 = query('produkty', "`id_podkat` = '".$row[0]."'");
  31. $ilosc = mnr($query1);
  32. show('<tr class="cat_'.$class.'"><th><a href="'.$URL.'/products/'.$inc[1].'/'.$row[0].'/">'.$row[$lang].'&nbsp;('.$ilosc.')<a/></th></tr>');
  33. }
  34. show('</table></th></tr></table>
  35.  
  36. ');
  37.  
  38.  
  39. ?>

Problem jest w tym, że nie wyświetla on podkategorii danej kategori tylko wyswietla cos takiego
Kod
[b]Fatal error[/b]:  Maximum execution time of 120 seconds exceeded in [b]c:\usr\www\function.php[/b] on line [b]24[/b]
i wyswietla duuuużo 0 na stronie. Jak temu zaradzic?

Ten post edytował Mlodycompany 7.07.2008, 09:39:12
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 03:15