Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]System RainTPL i problem z pętlą
Woytek950
post
Post #1





Grupa: Zarejestrowani
Postów: 130
Pomógł: 2
Dołączył: 6.06.2008
Skąd: jesteś ?

Ostrzeżenie: (0%)
-----


Witam. Mam problem z systemem szablonów RainTPl, mianowicie gdy robię pętlę i wyświetlam ją to pętla dodatkowo wykonuj się jeszcze raz mimo iż rekordów jest 3 a robi 4 divy.

Mógł by ktoś pomóc?


Plik index.php
  1. $query_3 = mysql_query("SELECT * FROM bloks") or die(mysql_error());
  2. $array_3 = array();
  3. while($array_3[] = mysql_fetch_array($query_3));
  4. $tpl->assign( "bloks", $array_3 );


Plik main.tpl
  1. {loop name="bloks"}{if condition="$value.hide == 0"}<div class="menu_left">{$value.title}</div>{/if}{/loop}





ref

ref
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Woytek950
post
Post #2





Grupa: Zarejestrowani
Postów: 130
Pomógł: 2
Dołączył: 6.06.2008
Skąd: jesteś ?

Ostrzeżenie: (0%)
-----


Dziękuj bardzo za odpowiedź !


Pozdro



Tylko jest kolejny problem :/ ;/ 

Wyświetla się :

  1. Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes) in /home/a7764643/public_html/new/index.php on line 60


Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 4.10.2025 - 00:21