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

Smarty based table sort plugin ?

 
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 -> Add-ons
View previous topic :: View next topic  
Author Message
bluesapphire
Smarty Rookie


Joined: 03 Feb 2006
Posts: 5

PostPosted: Wed Feb 16, 2011 12:33 am    Post subject: Smarty based table sort plugin ? Reply with quote

Is here any smarty based table data sorting plugin ?

Thanks in adavnce
Back to top
View user's profile Send private message
uffeUtvecklare
Smarty Rookie


Joined: 23 Feb 2011
Posts: 8

PostPosted: Thu Mar 03, 2011 11:02 am    Post subject: Re: Smarty based table sort plugin ? Reply with quote

bluesapphire wrote:
Is here any smarty based table data sorting plugin ?

Thanks in adavnce


What kind of data sorting and what kind of tables?
Back to top
View user's profile Send private message
jman
Smarty Rookie


Joined: 14 Apr 2007
Posts: 8

PostPosted: Sun Mar 13, 2011 3:48 pm    Post subject: Reply with quote

Hopefully if you're trying to sort data it's coming from a database, not hard coded info.

Would be best to do the sorting in your DB & just pass that to Smarty, rendering it with foreach, section, etc.

If you don't want to go with PEAR, there's a very good php MySQL class called "ezSQL" http://justinvincent.com/ezsql which makes it very easy to use databases with php (it actually supports many RDBM's such as Postgre, Oracle, MS-SQL, etc.). http://www.learnwake.com/scripts/ez_sql/ez_sql_with_smarty.html shows how to use ezSQL with Smarty. The ezSQL author also has a php class for pagination, which has been slightly extended by the author on the learnwake site.

However, if your data is hard-coded, again it would be better to present the sorted data to Smarty. In this case you'd want to check out PHP's many sorting features.
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 -> Add-ons 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