|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
bluesapphire Smarty Rookie
Joined: 03 Feb 2006 Posts: 5
|
Posted: Wed Feb 16, 2011 12:33 am Post subject: Smarty based table sort plugin ? |
|
|
Is here any smarty based table data sorting plugin ?
Thanks in adavnce |
|
Back to top |
|
uffeUtvecklare Smarty Rookie
Joined: 23 Feb 2011 Posts: 8
|
Posted: Thu Mar 03, 2011 11:02 am Post subject: Re: Smarty based table sort plugin ? |
|
|
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 |
|
jman Smarty Rookie
Joined: 14 Apr 2007 Posts: 8
|
Posted: Sun Mar 13, 2011 3:48 pm Post subject: |
|
|
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 |
|
|
|
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
|