Hi,
I've just installed the phpMyFAQ version 2.6.7 in a Windows 2008 server using MSSQL 2008 and in Admin Page when I click in the Comments administration I get the following errors:
Comments administration
phpMyFAQ warning [2]: mssql_query() [function.mssql-query]: message: Incorrect syntax near the keyword 'user'. (severity 15) in C:\inetpub\wwwroot\faq\inc\PMF_DB\Mssql.php on line 94
phpMyFAQ warning [2]: mssql_query() [function.mssql-query]: Query failed in C:\inetpub\wwwroot\faq\inc\PMF_DB\Mssql.php on line 94
phpMyFAQ warning [2]: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in C:\inetpub\wwwroot\faq\inc\PMF_DB\Mssql.php on line 161
Best Regards,
William.
Error in Comment Admin with MSSQL 2008 using 2.6.7 version,
Moderator: Thorsten
Re: Error in Comment Admin with MSSQL 2008 using 2.6.7 version,
Just to complement my question, I've included a print $query in the mssql.php before the error line to check the syntax. The query is:
SELECT fc.id AS id, fc.lang AS lang, fc.parent_id AS parent_id, fc.name AS name, fc.description AS description, fc.user_id AS user_id FROM faqcategories fc LEFT JOIN faqcategory_group fg ON fc.id = fg.category_id LEFT JOIN faqcategory_user fu ON fc.id = fu.category_id GROUP BY fc.id, fc.lang, fc.parent_id, fc.name, fc.description, fc.user_id ORDER BY fc.id SELECT DISTINCT fc.id_comment AS comment_id, fc.id AS record_id, fcg.category_id, fc.usr AS user, fc.email AS email, fc.comment AS comment, fc.datum AS comment_date FROM faqcomments fc LEFT JOIN faqcategoryrelations fcg ON fc.id = fcg.record_id WHERE type = 'faq'
Regards,
William.
SELECT fc.id AS id, fc.lang AS lang, fc.parent_id AS parent_id, fc.name AS name, fc.description AS description, fc.user_id AS user_id FROM faqcategories fc LEFT JOIN faqcategory_group fg ON fc.id = fg.category_id LEFT JOIN faqcategory_user fu ON fc.id = fu.category_id GROUP BY fc.id, fc.lang, fc.parent_id, fc.name, fc.description, fc.user_id ORDER BY fc.id SELECT DISTINCT fc.id_comment AS comment_id, fc.id AS record_id, fcg.category_id, fc.usr AS user, fc.email AS email, fc.comment AS comment, fc.datum AS comment_date FROM faqcomments fc LEFT JOIN faqcategoryrelations fcg ON fc.id = fcg.record_id WHERE type = 'faq'
Regards,
William.
Re: Error in Comment Admin with MSSQL 2008 using 2.6.7 version,
Hi William,
this fix should help you: http://github.com/thorsten/phpMyFAQ/com ... d0eb76bb33
bye
Thorsten
this fix should help you: http://github.com/thorsten/phpMyFAQ/com ... d0eb76bb33
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Error in Comment Admin with MSSQL 2008 using 2.6.7 version,
Hi Thorsten,
After the patch in the both files, the message warning has changed to:
phpMyFAQ warning [2]: mssql_query() [function.mssql-query]: message: The text data type cannot be selected as DISTINCT because it is not comparable. (severity 16) in Mssql.php on line 94
phpMyFAQ warning [2]: mssql_query() [function.mssql-query]: Query failed in Mssql.php on line 94
phpMyFAQ warning [2]: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in Mssql.php on line 161
The query is:
SELECT fc.id AS id, fc.lang AS lang, fc.parent_id AS parent_id, fc.name AS name, fc.description AS description, fc.user_id AS user_id FROM faqcategories fc LEFT JOIN faqcategory_group fg ON fc.id = fg.category_id LEFT JOIN faqcategory_user fu ON fc.id = fu.category_id GROUP BY fc.id, fc.lang, fc.parent_id, fc.name, fc.description, fc.user_id ORDER BY fc.id SELECT DISTINCT fc.id_comment AS comment_id, fc.id AS record_id, fcg.category_id, fc.usr AS username, fc.email AS email, fc.comment AS comment, fc.datum AS comment_date FROM faqcomments fc LEFT JOIN faqcategoryrelations fcg ON fc.id = fcg.record_id WHERE type = 'faq'
Best Regards,
William.
After the patch in the both files, the message warning has changed to:
phpMyFAQ warning [2]: mssql_query() [function.mssql-query]: message: The text data type cannot be selected as DISTINCT because it is not comparable. (severity 16) in Mssql.php on line 94
phpMyFAQ warning [2]: mssql_query() [function.mssql-query]: Query failed in Mssql.php on line 94
phpMyFAQ warning [2]: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in Mssql.php on line 161
The query is:
SELECT fc.id AS id, fc.lang AS lang, fc.parent_id AS parent_id, fc.name AS name, fc.description AS description, fc.user_id AS user_id FROM faqcategories fc LEFT JOIN faqcategory_group fg ON fc.id = fg.category_id LEFT JOIN faqcategory_user fu ON fc.id = fu.category_id GROUP BY fc.id, fc.lang, fc.parent_id, fc.name, fc.description, fc.user_id ORDER BY fc.id SELECT DISTINCT fc.id_comment AS comment_id, fc.id AS record_id, fcg.category_id, fc.usr AS username, fc.email AS email, fc.comment AS comment, fc.datum AS comment_date FROM faqcomments fc LEFT JOIN faqcategoryrelations fcg ON fc.id = fcg.record_id WHERE type = 'faq'
Best Regards,
William.
Re: Error in Comment Admin with MSSQL 2008 using 2.6.7 version,
Hello Thorsten,
Could you reproduce this new problem (after applying your fix)?
Best Regards,
William.
Could you reproduce this new problem (after applying your fix)?
Best Regards,
William.
Re: Error in Comment Admin with MSSQL 2008 using 2.6.7 version,
Hi,
could you please try this fix: http://github.com/thorsten/phpMyFAQ/com ... aa6fbef82a
bye
Thorsten
could you please try this fix: http://github.com/thorsten/phpMyFAQ/com ... aa6fbef82a
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Error in Comment Admin with MSSQL 2008 using 2.6.7 version,
Thorsten,
Now it shows the FAQ comments but there is still the error below:
phpMyFAQ notice [8]: Undefined property: stdClass::$user in Comment.php on line 327
Best Regards,
William.
Now it shows the FAQ comments but there is still the error below:
phpMyFAQ notice [8]: Undefined property: stdClass::$user in Comment.php on line 327
Best Regards,
William.
Re: Error in Comment Admin with MSSQL 2008 using 2.6.7 version,
Hi,
aaahhh....
Here's the fix: http://github.com/thorsten/phpMyFAQ/com ... 4d277b8c83
Thanks a lot for your patience!
bye
Thorsten
aaahhh....

Here's the fix: http://github.com/thorsten/phpMyFAQ/com ... 4d277b8c83
Thanks a lot for your patience!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Error in Comment Admin with MSSQL 2008 using 2.6.7 version,
Perfect. Now everything it's OK.
Regards,
William.
Regards,
William.