Selecting smarty sortable MySQL table

Asked By 0 points N/A Posted on -
qa-featured

I need automatically importing form data into MYSQL and MYSQL without SQL to access to MySQL servers. Have you experience in using of smartly sortable MySQL table and which tool is the best one?

SHARE
Answered By 5 points N/A #147790

Selecting smarty sortable MySQL table

qa-featured

 

Hi
 
If you're trying to sort data it's coming from a database, not hard coded information 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.).
 
https://ccm.net/download/download-21607-pinnacle-studio-plus 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.

Related Questions