-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with sorting and pagination #2259
Comments
Hi, All your problems are in your php list action processing. Because when you are paging and/or sorting an edit, or create may or may not produce a record for your current page. The jTable processing for create and delete would break the number of rows per page. So after a good return, jtable performs an internal reload, which issues a new list request, to get a revised page worth of data. Without wishing to give a lesson on php mysql prepared statements, here is a get function that I used to use. It is NOT suitable for a production application. It does use the php mysqli interface, but that would be a good thing for you to learn yourself.
|
Good day all,
If in a table i don't set pagination and sorting, all (select,update,create,delete) work good, if i set pagination and/or sorting, select works good, but update, create and delete return error after form save button clicked.
The query (php) works good, i can see the table updated from mysql client and if i reload the table the new query is showed.
Code:
jQuery:
php:
MYSQL table structure (InnoDB UTF8)
+---------------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+----------------------+------+-----+---------+----------------+
| id_fondo | smallint(5) unsigned | NO | PRI | NULL | auto_increment |
| nome | varchar(100) | YES | | NULL | |
| valore_carico | decimal(10,5) | YES | | NULL | |
| quantita | decimal(10,4) | YES | | NULL | |
+---------------+----------------------+------+-----+---------+----------------+
May be decimals number > 2 gets problems?
JTable 2.4.0 minified
Regards
Fabrizio
The text was updated successfully, but these errors were encountered: