My b2evolution Version: 1.10.x
Hi,
On my 1.10.2 installation, I want to use the function "generic_ctp_number".
The code is :
<?php
$CommentList = & new CommentList( $blog, "'comment','trackback','pingback'", array('published'), '', '', 'DESC', '', 20 );
while( $Item = $BlogBList->get_item() )
{
$CommentList->display_if_empty( T_('No comment yet...'));
generic_ctp_number($Item->ID, 'comments');
}
?>
And the result is :
Warning: Invalid argument supplied for foreach() in /homepages/16/xxxxxxxx/htdocs/domain/blogs/inc/MODEL/comments/_comment.funcs.php on line 64
MySQL error!
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 ') GROUP BY comment_post_ID, comment_type, comment_status(Errno=1064)
Your query:
SELECT comment_post_ID, comment_type, comment_status, COUNT(*) AS type_count
FROM evo_comments
WHERE comment_post_ID IN ()
GROUP BY comment_post_ID, comment_type, comment_status
Any idea ?
Thanks in advance.
I have no answer, but someone can do something with this information:
The function is [url=http://doc.b2evolution.net/v-0-9/__filesource/fsource_evocore__blogsb2evocore_functions_comments.php.html#a26]here[/url]
It sais the SQL query is this:
and I believe $postIDlist is "" (empty) and that is what causes this not to work.
$postIDlist is instantiated [url=http://doc.b2evolution.net/v-0-9/__filesource/fsource_evocore__blogsb2evocore_class_itemlist.php.html#a544]here[/url]:
So if this doesn't work, it is my educated guess this is more like a bug.