First I would like to say I have about 127 records in phpmyfaq and so far am very impressed. The one thing that I would like to see is the ability to sort messages by Title. I have a lot of records in some categories and they're mostly error numbers. Being sorted by title would make it easier to browse through them.
I'm pretty good with MySQL queries but haven't looked at any of the files to see where the query is stored. Anyone know what file it's in so I can try to get it sorted myself?
Thanks in advance!
Sorting records
Moderator: Thorsten
-
- Posts: 6
- Joined: Thu Apr 22, 2004 1:55 pm
- Contact:
Hi,
search for the function printThemes() in the file inc/functions.php and search for this code:
change it to
and it should work.
bye
Thorsten
search for the function printThemes() in the file inc/functions.php and search for this code:
Code: Select all
$result = $db->query("SELECT ".$sqltblpre."faqdata.id, ".$sqltblpre."faqdata.lang, ".$sqltblpre."faqdata.thema, ".$sqltblpre."faqdata.rubrik, ".$sqltblpre."faqvisits.visits FROM ".$sqltblpre."faqdata LEFT JOIN ".$sqltblpre."faqvisits ON ".$sqltblpre."faqdata.id = ".$sqltblpre."faqvisits.id AND ".$sqltblpre."faqvisits.lang = ".$sqltblpre."faqdata.lang WHERE ".$sqltblpre."faqdata.active = 'yes' AND ".$sqltblpre."faqdata.rubrik = '".$category."' ORDER BY ".$sqltblpre."faqdata.id LIMIT ".$first.", 10");
Code: Select all
$result = $db->query("SELECT ".$sqltblpre."faqdata.id, ".$sqltblpre."faqdata.lang, ".$sqltblpre."faqdata.thema, ".$sqltblpre."faqdata.rubrik, ".$sqltblpre."faqvisits.visits FROM ".$sqltblpre."faqdata LEFT JOIN ".$sqltblpre."faqvisits ON ".$sqltblpre."faqdata.id = ".$sqltblpre."faqvisits.id AND ".$sqltblpre."faqvisits.lang = ".$sqltblpre."faqdata.lang WHERE ".$sqltblpre."faqdata.active = 'yes' AND ".$sqltblpre."faqdata.rubrik = '".$category."' ORDER BY ".$sqltblpre."faqdata.thema LIMIT ".$first.", 10");
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 6
- Joined: Thu Apr 22, 2004 1:55 pm
- Contact: