Dragonfly CMS v9 ⇒ CPG-BB (forum) :: Archives ⇒ Delete Forum board causes vote table error :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Index Modules & Blocks CPG-BB (forum) ⇒ Archives

Archived ⇒ Delete Forum board causes vote table error


I'm getting the error below when I try to delete a forum from the admin panel:

admin/modules/forums/admin_forums.php * 0.0338 - LINE 486: SELECT v.vote_id FROM cms_bbvote_desc v, cms_bbtopics t WHERE t.forum_id = 51 AND v.topic_id = t.topic_id includes/db/db.php * CMS Warning line 75: On /cpgn3/admin.php?op=Forums&do=forums While executing query "DELETE FROM cms_bbvote_desc WHERE vote_id IN (, 2198)" 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 ' 2198)' at line 1 In: /path/cpgn3/admin/modules/forums/admin_forums.php on line: 496

The part of the admin_forums.php file in question is this:

if ($row = $db->sql_fetchrow($result)) { $vote_ids = ''; do { $vote_ids = (($vote_ids != '') ? ', ' : '') . $row['vote_id']; } while ($row = $db->sql_fetchrow($result)); $db->sql_query("DELETE FROM " . VOTE_DESC_TABLE . " WHERE vote_id IN ($vote_ids)"); $db->sql_query("DELETE FROM " . VOTE_RESULTS_TABLE . " WHERE vote_id IN ($vote_ids)"); $db->sql_query("DELETE FROM " . VOTE_USERS_TABLE . " WHERE vote_id IN ($vote_ids)");

The first of the three delete statements.

I've run the previous select and get a normal output of topic ids - about 10 with no empty values or peculiarities.

Any ideas?

Thanks!

Olive Net
British Army
Royal Navy
Military Clothing and Equipment - This Tribe

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Slackware 12 / CentOS, PHP 5.6, MySQL 5, Apache 2


www.dragonflycms.org/c...?d=9.9-9.8

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

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Thanks Nano - should have checked the bugs / CVS, sorry.

Olive Net
British Army
Royal Navy
Military Clothing and Equipment - This Tribe

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Slackware 12 / CentOS, PHP 5.6, MySQL 5, Apache 2

All times are UTC