some users get this db error

Post Reply
dellow
Posts: 119
Joined: 22 Mar 2016, 22:33
Name: Adel

some users get this db error

Post by dellow »

Database Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''%Y-%V')=date_format(DATE_ADD(now(),INTERVAL 0 WEEK),'%Y-%V'))) and e.parent_ite' at line 1

Query: select e.* , (e.field_386*e.field_387) as field_388, (e.field_390*e.field_389) as field_391, (e.field_393*e.field_394*e.field_398) as field_397 from app_entity_26 e where e.id>0 and ((FROM_UNIXTIME(.field_227,'%Y-%V')=date_format(DATE_ADD(now(),INTERVAL 0 WEEK),'%Y-%V'))) and e.parent_item_id in (select e.id from app_entity_21 e where e.id>0 and ((select count(*) as total from app_entity_21_values cv where cv.items_id=e.id and cv.fields_id='161' and cv.value in (select id from app_fields_choices fc where fc.fields_id='161' and find_in_set(20,fc.users)))>0 or (select count(*) as total from app_entity_21_values cv where cv.items_id=e.id and cv.fields_id='202' and cv.value in (select id from app_fields_choices fc where fc.fields_id='202' and find_in_set(20,fc.users)))>0 or (select count(*) as total from app_entity_21_values cv where cv.items_id=e.id and cv.fields_id='205' and cv.value in (select id from app_fields_choices fc where fc.fields_id='205' and find_in_set(20,fc.users)))>0 or e.created_by='20') ) and ((select count(*) as total from app_entity_26_values cv where cv.items_id=e.id and cv.fields_id='257' and cv.value in (select id from app_fields_choices fc where fc.fields_id='257' and find_in_set(20,fc.users)))>0 or (select count(*) as total from app_entity_26_values cv where cv.items_id=e.id and cv.fields_id='258' and cv.value in (select id from app_fields_choices fc where fc.fields_id='258' and find_in_set(20,fc.users)))>0 or e.created_by='20') order by e.id

Page: /1.8/index.php?module=dashboard/&action=update_hot_reports&reports_id=115
User avatar
support
Site Admin
Posts: 6147
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: some users get this db error

Post by support »

to fix this issue just rewrite attached file in includes/classes/reports/reports.php
Attachments
reports.php
(30.87 KiB) Downloaded 334 times
Post Reply