2019-10-15 22:12:05 ERROR LEVEL 8 On line 13 in file C:\Pravosudie\sdp\program\hearing_list.php: Undefined index: _vnkod 2019-10-15 22:12:05 ERROR LEVEL 8 On line 19 in file C:\Pravosudie\sdp\program\hearing_list.php: Undefined index: _numBuild 2019-10-15 22:12:05 ERROR LEVEL 2 On line 53 in file C:\Pravosudie\sdp\program\sqls\classPgSql.php: pg_query(): Query failed: ����: ����� ���������� (��������� ���������: "and") LINE 20: where c.vnkod='' and c.num_build = and e.vnkod='' and e.n... ^
====================================================================================================
QUERY: select c.id, c.uid, c.case_number, c.judge judge, case when c.case_type <> ' ' then 0 else 50780001 end case_type, 1540006 delo_id, (select u1_get_criminals_info(c.id,1,5)) info, (select u1_docs_on_case_id(c.id, c.case_number, c.vnkod, c.num_build)) documentid, to_char(e.event_time, 'HH24:MI') event_time, e.event_name event_name, e.room_number room_number, case when e.event_result is not null then e.event_result else c.result end event_result, c.year_reg year_reg, c.vnkod, c.num_build, 'u1' tbl from u1_case c inner join u1_event e on e.case_id = c.id where c.vnkod='' and c.num_build = and e.vnkod='' and e.num_build = and e.event_date = '15.10.2019' and ((upper(e.event_name) like '% %') or (upper(e.event_name) like '% %') or (upper(e.event_name) like '% %')) union select c.id, c.uid, c.case_number, c.judge judge, 0 case_type, 4 delo_id, (select u2_get_criminals_info(c.id,1,5)) info, (select u2_docs_on_case_id(c.id, c.case_number, c.vnkod, c.num_build)) documentid, to_char(e.event_time, 'HH24:MI') event_time, e.event_name event_name, e.room_number room_number, case when e.event_result is not null then e.event_result else c.result end event_result, c.year_reg year_reg, c.vnkod, c.num_build, 'u2' tbl from u2_case c inner join u2_event e on e.case_id = c.id where c.vnkod='' and c.num_build = and e.vnkod='' and e.num_build = and e.event_date = '15.10.2019' and ((upper(e.event_name) like '% %') or (upper(e.event_name) is null)) union select c.id, c.uid, c.case_number, c.judge judge, 0 case_type, 2450001 delo_id, (select u33_get_criminals_info(c.id,1,5)) info, (select u3_docs_on_case_id(c.id, c.case_number, c.vnkod, c.num_build)) documentid, to_char(e.event_time, 'HH24:MI') event_time, '' event_name, e.room_number room_number, case when e.event_result is not null then e.event_result else c.result end event_result, c.year_reg year_reg, c.vnkod, c.num_build, 'u33' tbl from u33_case c inner join u33_event e on e.case_id = c.id where c.vnkod='' and c.num_build = and e.vnkod='' and e.num_build = and e.event_date = '15.10.2019' union select c.id, c.uid, c.case_number, c.judge judge, case when c.case_type <> ' ' then 0 else 50520004 end case_type, 1540005 delo_id, (case when c.category is null then ' ' else ': ' || c.category || '
' end || coalesce((select g1_parts_on_case(c.id,1)), ' ')) info, (select g1_docs_on_case_id(c.id, c.case_number, c.vnkod, c.num_build)) documentid, to_char(e.event_time, 'HH24:MI') event_time, e.event_name event_name, e.room_number room_number, case when e.event_result is not null then e.event_result else c.result end event_result, c.year_reg year_reg, c.vnkod, c.num_build, 'g1' tbl from g1_case c inner join g1_event e on e.case_id = c.id where c.vnkod='' and c.num_build = and e.vnkod='' and e.num_build = and e.event_date = '15.10.2019' and ((upper(e.event_name) like '% %') OR (upper(e.event_name) like '% %') OR (upper(e.event_name) like '%%') or (upper(e.event_name) like '% %') or (upper(e.event_name) like '% %') or (upper(e.event_name) like '% %')) union select c.id, c.uid, c.case_number, c.judge judge, 0 case_type, 5 delo_id, (case when c.category is null then ' ' else ': ' || c.category || '
' end || coalesce((select g2_parts_on_case(c.id,1)), ' ')) info, (select g2_docs_on_case_id(c.id, c.case_number, c.vnkod, c.num_build)) documentid, to_char(e.event_time, 'HH24:MI') event_time, e.event_name event_name, e.room_number room_number, case when e.event_result is not null then e.event_result else c.result end event_result, c.year_reg year_reg, c.vnkod, c.num_build, 'g2' tbl from g2_case c inner join g2_event e on e.case_id = c.id where c.vnkod='' and c.num_build = and e.vnkod='' and e.num_build = and e.event_date = '15.10.2019' and ((upper(e.event_name) like '% %') or (upper(e.event_name) is null)) union select c.id, c.uid, c.case_number, c.judge judge, 0 case_type, 2800001 delo_id, (case when c.category is null then ' ' else ': ' || c.category || '
' end ||' (): '|| cc.declarant_name) info, (select g3_docs_on_case_id(c.id, c.case_number, c.vnkod, c.num_build)) documentid, to_char(e.event_time, 'HH24:MI') event_time, '' event_name, e.room_number room_number, case when e.event_result is not null then e.event_result else c.result end event_result, c.year_reg year_reg, c.vnkod, c.num_build, 'g33' tbl from g33_case c inner join g33_event e on e.case_id = c.id inner join g33_complaint cc on cc.case_id = c.id where c.vnkod='' and c.num_build = and e.vnkod='' and e.num_build = and e.event_date = '15.10.2019' union select c.id, c.uid, c.case_number, c.judge judge, 0 case_type, 1502001 delo_id, (select adm1_get_persons(c.id)) info, (select adm1_docs_on_case_id(c.id, c.case_number, c.vnkod, c.num_build)) documentid, to_char(e.event_time, 'HH24:MI') event_time, e.event_name event_name, e.room_number room_number, case when e.event_result is not null then e.event_result else c.result end event_result, c.year_reg year_reg, c.vnkod, c.num_build, 'adm1' tbl from adm1_case c inner join adm1_event e on e.case_id = c.id where c.vnkod='' and c.num_build = and e.vnkod='' and e.num_build = and e.event_date = '15.10.2019' and ((upper(e.event_name) like '% %')) union select c.id, c.uid, c.case_number, c.judge judge, 0 case_type, 1513001 delo_id, (select adm2_get_persons(c.id)) info, (select adm2_docs_on_case_id(c.id, c.case_number, c.vnkod, c.num_build)) documentid, to_char(e.event_time, 'HH24:MI') event_time, e.event_name event_name, e.room_number room_number, case when e.event_result is not null then e.event_result else c.result end event_result, c.year_reg year_reg, c.vnkod, c.num_build, 'adm2' tbl from adm2_case c inner join adm2_event e on e.case_id = c.id where c.vnkod='' and c.num_build = and e.vnkod='' and e.num_build = and e.event_date = '15.10.2019' and ((upper(e.event_name) like '% %')) union select c.id, c.uid, c.case_number, c.judge judge, 0 case_type, 1610001 delo_id, (select m_get_criminals_info(c.id)) info, (select m_docs_on_case_id(c.id, c.case_number, c.vnkod, c.num_build)) documentid, to_char(e.event_time, 'HH24:MI') event_time, e.event_name event_name, e.room_number room_number, case when e.event_result is not null then e.event_result else c.result end event_result, c.year_reg year_reg, c.vnkod, c.num_build, 'm' tbl from m_case c inner join m_event e on e.case_id = c.id where c.vnkod='' and c.num_build = and e.vnkod='' and e.num_build = and e.event_date = '15.10.2019' and ((upper(e.event_name) like '% %')) order by delo_id, case_type, event_time
====================================================================================================
ОШИБКА: ошибка синтаксиса (примерное положение: "and") LINE 20: where c.vnkod='' and c.num_build = and e.vnkod='' and e.n... ^