After the import from phpbb3, the counter for the topics table is not correct. This means that I have to edit the value. At the moment no_posts is only updated with a +1 value when a new reply is made. This means that it is not calculated and I need to do this manually.
On my code below the error is You have an error in your SQL syntax;
Can you please let me know what's wrong with my statement?
UPDATE `codo_topics` SET `no_posts` = (SELECT COUNT(`post_id`) FROM `codo_posts` WHERE `codo_posts`.`topic_id` = `codo_topics`.`topic_id`)
Thank you so much.
After the import from phpbb3, the counter for the topics table is not correct. This means that I have to edit the value. At the moment no_posts is only updated with a +1 value when a new reply is made. This means that it is not calculated and I need to do this manually.
On my code below the error is You have an error in your SQL syntax;
Can you please let me know what's wrong with my statement?
````
UPDATE `codo_topics` SET `no_posts` = (SELECT COUNT(`post_id`) FROM `codo_posts` WHERE `codo_posts`.`topic_id` = `codo_topics`.`topic_id`)
````
Thank you so much.
