Quote:
Originally Posted by markis13446
Hi tried to leave a comment on a photo, but getting this error:
Invalid SQL:
SELECT COUNT(image_id) AS ImageCommCount FROM garage_image_comments WHERE image_id = '82' WHERE active = '1';
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 'WHERE active = '1'' at line 1
Error Number : 1064
|
Open includes/garage_func_var.php
Find
PHP Code:
$img_comm_cnt_query = $vbulletin->db->query_read("SELECT COUNT(image_id) AS ImageCommCount FROM " . TABLE_PREFIX . "garage_image_comments WHERE image_id = '$data[id]' WHERE active = '1'");
replace with
PHP Code:
$img_comm_cnt_query = $vbulletin->db->query_read("SELECT COUNT(image_id) AS ImageCommCount FROM " . TABLE_PREFIX . "garage_image_comments WHERE image_id = '$data[id]' && active = '1'");