#585 Fatal database error when sorting columns

Database
closed
Reini Urban
5
2014-12-22
2007-11-14
No

Display backlinks.

Sort column by Page Name.

You get a fatal error.

Fatal PhpWiki Error

lib/WikiDB/backend/PearDB.php (In template 'body' < 'html'):1032: Error[256]: WikiDB_backend_PearDB_sqlite: fatal database error

* DB Error: unknown error
* (1 ** SELECT linker.id AS id, linker.pagename AS pagename FROM link, page linker, page linkee, nonempty WHERE linkfrom=linker.id AND linkto=linkee.id AND linkee.pagename='HomePage' AND nonempty.id=linker.id ORDER BY $want.pagename ASC [DB Error: unknown error])

Patch to correct:

file
lib/WikiDB/backend/PearDB.php
- if ($orderby) $orderby = ' ORDER BY $want.' . $orderby;
+ if ($orderby) $orderby = " ORDER BY $want." . $orderby;

This make the sorting by Page Name work.

However, the sorting by Last Modified or Last Author does not seem to work (Hits works).

Discussion

  • Logged In: YES
    user_id=1118700
    Originator: YES

    Hello,

    Thank you for taking my patch into account.

    Now sorting by Page Name works.

    However, sorting by Last Modified or Last Author does not seem to work.

    Could you please confirm that?

    Best regards,

    Marc-Etienne Vargenau

     
  • Logged In: YES
    user_id=1118700
    Originator: YES

    Hello,

    Thank you for taking my patch into account.

    Now sorting by Page Name works.

    However, sorting by Last Modified or Last Author does not seem to work.

    Could you please confirm that?

    Best regards,

    Marc-Etienne Vargenau