jQuery Datatables API with CI4 |
Hello everyone.
I often use the jQuery DataTables library, so I made this plugin . Tableslgniter is an plugin base on CodeIgniter4. It will help you use jQuery Datatables in server side mode. If you need this plugin, you can visit the example and user guide website, or the git page. example and user guide website (The complete user guide is currently only have Chinese version. For English,we will add English version to complete user guide soon.But you can use Google Translate to read the user guide first.) git page
Hi, just tried the examples on your website. The first one dosen't sort at all. The second are sorting like this:
title1 title10 title11 title2 instead of title1 title2 ... title10 title11 (02-08-2020, 11:31 AM)jreklund Wrote: Hi, just tried the examples on your website. The first one dosen't sort at all. The second are sorting like this: Hi, maybe my example case is not well designed. Involving the fields of a varchar structure in sorting can cause this problem. When the sort button is operated, the following query is generated: SELECT * FROM `news` ORDER BY `title` ASC Actually this query on the database(mysql db) will have the same result. The sorting of the first example has no effect, because the sorting function is not demonstrated in this example, so the sorting function is not activated. I will modify the example.
Hi, yeah MySQL don't like numbers they go for letters only in their natural sorting. Their are ways to allow this type of sorting in MySQL or it can be achieved by sorting in PHP instead. Don't know if this is what you want of your project or not.
DataTables have some plugins you can install to get this type of behavior as well. |
Welcome Guest, Not a member yet? Register Sign In |