Hi,
When performing an Advanced Search, I'm get the following error in Web Browser using MSSQL 2008:
phpMyFAQ warning [2]: mssql_query() [function.mssql-query]: message: Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column. (severity 16) in Mssql.php on line 94
phpMyFAQ warning [2]: mssql_query() [function.mssql-query]: Query failed in Mssql.php on line 94
I've printed the query below to give you more info:
SELECT config_name, config_value FROM faqconfig SELECT sid FROM faqsessions WHERE sid = 4 AND ip = '192.168.0.152' AND time > 1280612692 UPDATE faqsessions SET time = 1280699092, user_id = -1 WHERE sid = 4 AND ip = '192.168.0.152' 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 WHERE ( fg.group_id IN (-1) OR (fu.user_id = -1 AND fg.group_id IN (-1))) AND fc.lang = 'en' GROUP BY fc.id, fc.lang, fc.parent_id, fc.name, fc.description, fc.user_id ORDER BY fc.id SELECT COUNT(record_id) AS n FROM faqdata_tags SELECT count(sid) AS anonymous_users FROM faqsessions WHERE user_id = -1 AND time > 1280698792 SELECT count(session_id) AS registered_users FROM faquser WHERE session_timestamp > 1280698792 SELECT fd.id AS id, fd.lang AS lang, fd.thema AS thema, fcr.category_id AS category_id FROM faqdata fd LEFT JOIN faqcategoryrelations fcr ON fd.id = fcr.record_id AND fd.lang = fcr.record_lang LEFT JOIN faqdata_group AS fdg ON fd.id = fdg.record_id LEFT JOIN faqdata_user AS fdu ON fd.id = fdu.record_id WHERE fd.lang = 'en' AND fd.date_start <= '20100801234452' AND fd.date_end >= '20100801234452' AND fd.active = 'yes' AND fd.sticky = 1 AND ( fdg.group_id IN (-1) OR (fdu.user_id = -1 AND fdg.group_id IN (-1))) SELECT fd.id AS id, fd.lang AS lang, fd.thema AS thema, fd.datum AS datum, fcr.category_id AS category_id, fv.visits AS visits, fv.last_visit AS last_visit FROM faqvisits fv, faqdata fd LEFT JOIN faqcategoryrelations fcr ON fd.id = fcr.record_id AND fd.lang = fcr.record_lang LEFT JOIN faqdata_group AS fdg ON fd.id = fdg.record_id LEFT JOIN faqdata_user AS fdu ON fd.id = fdu.record_id WHERE fd.date_start <= '20100801234452' AND fd.date_end >= '20100801234452' AND fd.id = fv.id AND fd.lang = fv.lang AND fd.active = 'yes' AND fd.lang = 'en' AND ( fdg.group_id IN (-1) OR (fdu.user_id = -1 AND fdg.group_id IN (-1))) ORDER BY fv.visits DESC SELECT fd.id AS id, fd.lang AS lang, fcr.category_id AS category_id, fd.thema AS thema, fd.content AS content, fd.datum AS datum, fv.visits AS visits FROM faqvisits fv, faqdata fd LEFT JOIN faqcategoryrelations fcr ON fd.id = fcr.record_id AND fd.lang = fcr.record_lang LEFT JOIN faqdata_group AS fdg ON fd.id = fdg.record_id LEFT JOIN faqdata_user AS fdu ON fd.id = fdu.record_id WHERE fd.date_start <= '20100801234452' AND fd.date_end >= '20100801234452' AND fd.id = fv.id AND fd.lang = fv.lang AND fd.active = 'yes' AND fd.lang = 'en' AND ( fdg.group_id IN (-1) OR (fdu.user_id = -1 AND fdg.group_id IN (-1))) ORDER BY fd.datum DESC SELECT tagging_id, tagging_name FROM faqtags ORDER BY tagging_name SELECT fd.id AS id, fd.lang AS lang, fd.thema AS thema, fcr.category_id AS category_id, fv.visits AS visits FROM faqdata fd LEFT JOIN faqcategoryrelations fcr ON fd.id = fcr.record_id AND fd.lang = fcr.record_lang LEFT JOIN faqvisits fv ON fd.id = fv.id AND fv.lang = fd.lang LEFT JOIN faqdata_group fdg ON fd.id = fdg.record_id LEFT JOIN faqdata_user fdu ON fd.id = fdu.record_id WHERE fd.date_start <= '20100801234452' AND fd.date_end >= '20100801234452' AND fd.active = 'yes' AND fcr.category_id = 0 AND fd.lang = 'en' ORDER BY fd.id SELECT faqdata.id AS id, faqdata.lang AS lang, faqdata.solution_id AS solution_id, faqcategoryrelations.category_id AS category_id, faqdata.thema AS question, faqdata.content AS answer FROM faqdata LEFT JOIN faqcategoryrelations ON faqdata.id = faqcategoryrelations.record_id AND faqdata.lang = faqcategoryrelations.record_lang WHERE (faqdata.thema LIKE '%aaa%' OR faqdata.content LIKE '%aaa%' OR faqdata.keywords LIKE '%aaa%') AND faqdata.lang = 'en' AND faqdata.active = 'yes'SELECT max(id) as current_id FROM faqsearches INSERT INTO faqsearches (id, lang, searchterm, searchdate) VALUES (1, 'en', 'aaa', '2010-08-01 23:44:52')
Best Regards,
William.
Error in Advanced Search - MSSQL 2K8 - phpMyFAQ v.2.6.7
Moderator: Thorsten
Re: Error in Advanced Search - MSSQL 2K8 - phpMyFAQ v.2.6.7
Hi,
looks like I chose the wrong column type. Please drop the table "faqsearches" and add the new one with:
Thanks!
bye
Thorsten
looks like I chose the wrong column type. Please drop the table "faqsearches" and add the new one with:
Code: Select all
CREATE TABLE faqsearches (
id INTEGER NOT NULL ,
lang VARCHAR(5) NOT NULL ,
searchterm VARCHAR(255) NOT NULL ,
searchdate DATETIME,
PRIMARY KEY (id, lang)
);
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Error in Advanced Search - MSSQL 2K8 - phpMyFAQ v.2.6.7
Hi Thorsten,
You were correct. After changing that column type as you instructed, everything is working OK.
Best Regards,
William.
You were correct. After changing that column type as you instructed, everything is working OK.
Best Regards,
William.
Re: Error in Advanced Search - MSSQL 2K8 - phpMyFAQ v.2.6.7
Hi,
thanks, I fixed it for the 2.6.8 release!
bye
Thorsten
thanks, I fixed it for the 2.6.8 release!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist