Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Memory Limit and Array in Smarty usage !

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Help Wanted (commercial)
View previous topic :: View next topic  
Author Message
mahdavikia
Smarty n00b


Joined: 17 Dec 2009
Posts: 2

PostPosted: Thu Dec 17, 2009 5:23 am    Post subject: Memory Limit and Array in Smarty usage ! Reply with quote

HI GUYS,
i am a php programmer.
please read follow code . this code run in my CMS core code , but my data is very big ! ! php fatal error of memory limit .
Code:

$res = mysql_query("select * from news order by ID DESC");
$num = mysql_num_rows($res);
for ($i = 0; $i < $num; $i++) {
    $row = mysql_fetch_array($res);
    $news_last_array[$row['groupid']][] = $row;
}
$smarty->assign("news_last", $news_last_array);

Now :
1- my is have problem in structure ?
2- this is a big problem in smarty ?

please help me ...pleaseeeeeee Embarassed
Back to top
View user's profile Send private message
ptonev
Smarty Rookie


Joined: 21 Apr 2003
Posts: 13
Location: Bulgaria, Sofia

PostPosted: Thu Dec 17, 2009 7:12 am    Post subject: Reply with quote

Hello,

you must make pagination. If we talk about something like export - do this without smarty.

regards,
Back to top
View user's profile Send private message Visit poster's website
mahdavikia
Smarty n00b


Joined: 17 Dec 2009
Posts: 2

PostPosted: Thu Dec 17, 2009 3:11 pm    Post subject: Reply with quote

thanks ...thaaaaaaaaaaaanks.
my problem fixed !
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Help Wanted (commercial) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP