RSS latest articles and generateNewestData SQL queries

Please report bugs here!

Moderator: Thorsten

Post Reply
jeffe
Posts: 1
Joined: Mon Mar 13, 2006 5:06 pm

RSS latest articles and generateNewestData SQL queries

Post by jeffe »

phpMyFAQ 1.5.7, Microsoft-IIS/5.0, MS SQLServer

Hi,

If you try to execute the query that retrieves the latest articles to build the RSS feed it will end up in an, non reported, error from sql server stating that you cannot use the DISTINCT keyword with 'text' field (the one from faqdata). Removing the distinct will fix the issue and, I think, will not cause colateral damages as the id of the article is present in the SELECT clause which makes the row pretty unique.

Another thing about this query. It won't work as it supposed to be unless you pay at least one visit to the article ! This is because the FROM clause contains both the faqdata and the faqvisists tables where it should contains only the faqdata table and a left join on the faqvisists table. Obviously the same problem occurs in the function generateNewestData.

Thank you anyway for this program as it enabled me to bring up a great working faq online in less than 5 min !

Jeff.
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I'll fix this as soon as possible.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

the issue with DISTINCT is fixed in CVS.

The second problem is no problem because when a new entry is added we also add a first entry in the table faqvisits.

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