Dragonfly CMS v9 ⇒ Modules & Blocks :: Archives ⇒ Topics db error :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & Blocks

Archived ⇒ Topics db error


Last week i moved servers. Now i'm getting an error with Topics. A bd error occurs and it won't show. Error df gives is:

includes/db/db.php

* CMS Warning line 51: On /Topics.html While executing query "SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS stories, SUM(s.counter) AS reads FROM cms_topics t LEFT JOIN cms_stories s ON (s.topic = t.topicid) GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext" the following error occured: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'reads FROM cms_topics t LEFT JOIN cms_stories s ON (s.topic = t.topicid) GROUP B' at line 1 In: /var/www/vhosts/xxxxxxxx/httpdocs/modules/Topics/index.php on line: 22

How to fix this?

Kokkieblanda
web: www.kokkieblanda.nl

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux 2.2.6 (fedora)/MySQL 5.0.51/PHP 5.2.5/Dragonfly 9.0.6.1


"reads" become a reserved word in MySQL 5, this is why you get the error.

You might try to use Topics module that comes with 9.1.2.1, however 9.0.6.1 will have few more issues with MySQL 5.

You can start patching up 9.0.6.1 but I strongly suggest upgrading to 9.2 when will be ready.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


thank you, it worked. When is 9.2 to be expected?

Kokkieblanda
web: www.kokkieblanda.nl

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux 2.2.6 (fedora)/MySQL 5.0.51/PHP 5.2.5/Dragonfly 9.0.6.1


After few initial problems have been reported and immediately fixed, RC2 is suppose to be stable as it is.

Feedback is very welcome since we count on releasing 9.2 before the end of January.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head

All times are UTC