[Phpmyadmin-devel] Remember the last way user sorted tables

Marc Delisle marc at infomarc.info
Fri May 27 18:53:13 CEST 2011


Aris Feryanto a écrit :
> Hi,
> 
> 
>> From: Marc Delisle <marc at infomarc.info>
>> To: phpmyadmin-devel at lists.sourceforge.net
>> Sent: Tuesday, May 24, 2011 7:45 PM
>> Subject: Re: [Phpmyadmin-devel] Remember the last way user sorted tables
>>
>> Piotr Przybylski a écrit :
>>> If you store all data in memory, I think you can use pma_userconfig
>>> table for that, just add a new text column for serialized data.
>> I think it's preferable not to modify this table's structure. It will be 
>> easier to handle for users and packagers, to have a new table, rather 
>> than changing the structure of the existing table.
>>
> 
> 
> I pushed changes to my repository. In the repo, I did some changes regarding the storage for "remember the last way user sorted tables":
> 
> - For the storage, I created a new table which store per table's data. The table consist of 4 columns: username, db_name, table_name, and prefs. I haven't put any limit for the number of records, as suggested by Piotr. I will do it after all features regarding table-browsing implemented.
> - I put new code to load and store "table sorting" in PMA_Table class.
> 
> To test these changes, you will need to create new table using script in scripts/create_tables.sql and change the configuration
> 
> $cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
> 
> (which I think cannot be done in demo server)
> 
> After this setup, you will be able to browse a table, sort them by clicking table's header, logout, login again, browse to the table, and the table will remain sorted in the last way you sorted it.
> Comments and suggestions are really appreciated.

Hi Aris,
the feature works fine and I believe it's ready to be merged in 
origin/master, do you agree?


-- 
Marc Delisle
http://infomarc.info




More information about the Developers mailing list