How sort articles?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
djavet
Posts: 22
Joined: Thu Sep 02, 2004 10:13 am

How sort articles?

Post by djavet »

Hello,

In admin area, how can I sort the article in the menu "Edit Articles" (Beiträge genehmigen) by category name?
When I try to edit record.show.php and change the query at line 31 to:

Code: Select all

SELECT faqdata.id, faqdata.lang, faqdata.rubrik, faqdata.thema, faqdata.author, faqcategories.name, faqcategories.id
FROM faqdata, faqcategories
WHERE faqdata.rubrik = faqcategories.id
ORDER  BY faqdata.rubrik, faqdata.id
That's doesn't work.... humm how can i do that?
It's more useful to sort by name rather than ID.

A lot of thx, Dominique
PS: I use 1.4.1
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

just sort them with faqdata.theme

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
djavet
Posts: 22
Joined: Thu Sep 02, 2004 10:13 am

Post by djavet »

Thx a lot.

I've found why my query doesn't work:
Before:

Code: Select all

$result = $db->query($query."LIMIT ".$start.", ".$perpage);
After:

Code: Select all

$result = $db->query($query." LIMIT ".$start.", ".$perpage);
You've forget to put a space just before "LIMIT" at line 50 of record-show.php.

Regards, Dominique
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you're right. I'll fix it for 1.4.2 RC2.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply