Error when opening table after sorting

Issue #150 resolved
Former user created an issue

Originally reported on Google Code with ID 150

What steps will reproduce the problem?

When clicking sort by "type" or "name", and then on table name or "action->browse"
next to table name, you get the following error:
Warning: SQLiteDatabase::query() [sqlitedatabase.query]: no such column: name in C:\wamp\www\phpliteadmin_v1-9-3\phpliteadmin.php
on line 835


This table is empty. Click here to insert rows.


What version of the product are you using? On what operating system? 
phpLiteAdmin v1.9.3; Windows XP SP3

Which Database Extension (PDO/SQLiteDatabase/SQLiteDatabase3 - see Database structure-tab
in phpLiteAdmin)?
SQLite version: 2.8.17
SQLite extension: SQLiteDatabase

Reported by jgjooste on 2012-11-21 16:07:58

Comments (3)

  1. Christopher Kramer
    I was able to reproduce this issue in current development version 1.9.4.
    
    Problem is we use the same session-variable for sorting tables and rows. We should
    use sortTables and sortRows instead.
    
    $_SESSION[COOKIENAME.'sort'] should be
       $_SESSION[COOKIENAME.'sortTables'] or $_SESSION[COOKIENAME.'sortRows']
    $_SESSION[COOKIENAME.'order'] should be
       $_SESSION[COOKIENAME.'orderTables'] or $_SESSION[COOKIENAME.'orderRows']
    

    Reported by crazy4chrissi on 2012-11-21 17:43:26 - Status changed: Accepted

  2. Christopher Kramer
    Just fixed this issue with r352.
    
    (Note: it only happened if you had not opened another table before. So to reproduce:
    logout, login, click sort by type or name, click on a table. The error does not show
    up with all SQLite extensions, but the wrong SQL command is tried to query in any case.)
    
    Moreover, it was completely useless that the db-structure-view stored the sorting in
    the session because it did unset this setting before it could be used. This was fixed
    in 352 as well. You can now change between DBs and the sorting of the tables will remain
    the same.
    

    Reported by crazy4chrissi on 2013-03-09 23:08:17 - Status changed: Fixed

  3. Log in to comment