SQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'field list'
sandipsapkota1 opened this issue · 9 comments
Please help
{"draw":4,"recordsTotal":0,"recordsFiltered":0,"data":[],"error":"Exception Message:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'field list' (SQL: select count(*) as aggregate from (select
panichd_tickets.
id,
panichd_tickets.
created_at,
panichd_tickets.
subjectas
subject,
panichd_tickets.
hiddenas
hidden,
panichd_tickets.
contentas
content,
panichd_tickets.
interventionas
intervention,
panichd_tickets.
status_idas
status_id,
panichd_statuses.
nameas
status,
panichd_statuses.
coloras
color_status,
panichd_priorities.
coloras
color_priority,
panichd_categories.
coloras
color_category,
panichd_tickets.
start_dateas
start_date, 0-CONVERT(date_format(panichd_tickets.start_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_start_date, CASE panichd_tickets.limit_date WHEN NULL THEN 0 ELSE 1 END as has_limit,
panichd_tickets.
limit_dateas
limit_date, 0-CONVERT(date_format(panichd_tickets.limit_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_limit_date,
panichd_tickets.
limit_dateas
calendar,
panichd_tickets.
updated_atas
updated_at,
panichd_tickets.
completed_atas
completed_at,
panichd_tickets.
agent_id, group_concat(agent.name) AS agent_name,
panichd_priorities.
nameas
priority,
panichd_priorities.
magnitudeas
priority_magnitude,
panichd_members.
nameas
owner_name,
panichd_tickets.
user_id,
panichd_tickets.
creator_id,
panichd_tickets.
category_id,
panichd_categories.
nameas
category, group_concat(panichd_tags.id) AS tags_id, group_concat(panichd_tags.name) AS tags, group_concat(panichd_tags.bg_color) AS tags_bg_color, group_concat(panichd_tags.text_color) AS tags_text_color,
0as
deleted_owner, (select count(*) from
panichd_attachmentswhere
panichd_tickets.
id=
panichd_attachments.
ticket_id) as
all_attachments_count, (select count(*) from
panichd_commentswhere
panichd_tickets.
id=
panichd_comments.
ticket_idand
typein (reply, note, completetx) and
typein (reply, complete, completetx, reopen)) as
comments_count, (select count(*) from
panichd_commentswhere
panichd_tickets.
id=
panichd_comments.
ticket_idand
typein (reply, note, completetx) and
typein (reply, complete, completetx, reopen) and
panichd_comments.
updated_at> 2018-04-07 00:00:00) as
recent_comments_countfrom
panichd_ticketsinner join
userson
users.
id=
panichd_tickets.
user_idinner join
panichd_memberson
panichd_members.
id=
panichd_tickets.
user_idinner join
panichd_statuseson
panichd_statuses.
id=
panichd_tickets.
status_idinner join
panichd_membersas
agenton
agent.
id=
panichd_tickets.
agent_idinner join
panichd_prioritieson
panichd_priorities.
id=
panichd_tickets.
priority_idinner join
panichd_categorieson
panichd_categories.
id=
panichd_tickets.
category_idleft join
panichd_taggableson
panichd_tickets.
id=
panichd_taggables.
taggable_idand
panichd_taggables.
taggable_type= PanicHD\\PanicHD\\Models\\Ticket left join
panichd_tagson
panichd_taggables.
tag_id=
panichd_tags.
idwhere
completed_atis null and
user_id= 1 and
hidden= 0 and
user_id= 1 and
hidden= 0 group by
panichd_tickets.
id) count_row_table)"}
Hi, Same problem here.
This thing doesn't work :(
Did you figure out what was going on?
Hi,
Same here any news about that ?
This project is dead, nobody is answering :(
Hi guys,
@Fab-Miami This project isn't dead. It's just I haven't time to dedicate to it since a few weeks ago. That bug is known to me and It is on my plans to publish a patch for it. I'm sorry I can't tell you right know how to solve it exactly, but I guess I remember it's about an array key in TicketsController, but I'm not sure.
As soon as I can get back into it I'll give more feedback.
Hi
Solution is:
Change strict value in config/database.php to false like this:
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
'engine' => null,
],
Hello! We've just published a new release of the package :) Please check it out and confirm if the bug has been solved. Thank you in advance! @sandipsapkota1 @Fab-Miami @interprogs @marcoroma
Hi All! I haven't resolved the problem, I receive this error when I try to show user's tickets
DataTables warning: table id=tickets-table - Exception Message:
SQLSTATE[42S22]: Column not found: 1054 Unknown column '""' in 'field list' (SQL: select count() as aggregate from (select panichd_tickets
.id
, panichd_tickets
.created_at
, panichd_tickets
.subject
as subject
, panichd_tickets
.hidden
as hidden
, panichd_tickets
.content
as content
, panichd_tickets
.intervention
as intervention
, panichd_tickets
.status_id
as status_id
, panichd_statuses
.name
as status
, panichd_statuses
.color
as color_status
, panichd_priorities
.color
as color_priority
, panichd_categories
.color
as color_category
, panichd_tickets
.start_date
as start_date
, 0-CONVERT(date_format(panichd_tickets.start_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_start_date, CASE panichd_tickets.limit_date WHEN NULL THEN 0 ELSE 1 END as has_limit, panichd_tickets
.limit_date
as limit_date
, 0-CONVERT(date_format(panichd_tickets.limit_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_limit_date, panichd_tickets
.limit_date
as calendar
, panichd_tickets
.updated_at
as updated_at
, panichd_tickets
.completed_at
as completed_at
, panichd_tickets
.agent_id
, agent
.name
as agent_name
, panichd_priorities
.name
as priority
, panichd_priorities
.magnitude
as priority_magnitude
, members
.name
as owner_name
, creator
.name
as creator_name
, panichd_tickets
.user_id
, panichd_tickets
.creator_id
, panichd_categories
.id
as category_id
, panichd_categories
.name
as category
, group_concat(panichd_tags.id) AS tags_id, group_concat(panichd_tags.name) AS tags, group_concat(panichd_tags.bg_color) AS tags_bg_color, group_concat(panichd_tags.text_color) AS tags_text_color, ""
as dep_ancestor_name
, (select count() from panichd_attachments
where panichd_tickets
.id
= panichd_attachments
.ticket_id
) as all_attachments_count
, (select count() from panichd_comments
where panichd_tickets
.id
= panichd_comments
.ticket_id
and type
in (reply, note, completetx) and type
in (reply, complete, completetx, reopen) and type
!= note) as comments_count
, (select count() from panichd_comments
where panichd_tickets
.id
= panichd_comments
.ticket_id
and type
in (reply, note, completetx) and type
in (reply, complete, completetx, reopen) and type
!= note and panichd_comments
.updated_at
> 2019-01-07 00:00:00) as recent_comments_count
, (select count(*) from panichd_comments
where panichd_tickets
.id
= panichd_comments
.ticket_id
and panichd_comments
.type
= note) as internal_notes_count
from panichd_tickets
left join users
on users
.id
= panichd_tickets
.user_id
left join users
as members
on members
.id
= panichd_tickets
.user_id
left join users
as creator
on creator
.id
= panichd_tickets
.creator_id
inner join panichd_statuses
on panichd_statuses
.id
= panichd_tickets
.status_id
left join users
as agent
on agent
.id
= panichd_tickets
.agent_id
inner join panichd_priorities
on panichd_priorities
.id
= panichd_tickets
.priority_id
inner join panichd_categories
on panichd_categories
.id
= panichd_tickets
.category_id
left join panichd_taggables
on panichd_tickets
.id
= panichd_taggables
.taggable_id
and panichd_taggables
.taggable_type
= PanicHD\PanicHD\Models\Ticket left join panichd_tags
on panichd_taggables
.tag_id
= panichd_tags
.id
where completed_at
is null and user_id
= 2 and hidden
= 0 and user_id
= 2 and hidden
= 0 group by panichd_tickets
.id
) count_row_table)
Hi All! I haven't resolved the problem, I receive this error when I try to show user's tickets
DataTables warning: table id=tickets-table - Exception Message:
SQLSTATE[42S22]: Column not found: 1054 Unknown column '""' in 'field list' (SQL: select count() as aggregate from (select
panichd_tickets
.id
,panichd_tickets
.created_at
,panichd_tickets
.subject
assubject
,panichd_tickets
.hidden
ashidden
,panichd_tickets
.content
ascontent
,panichd_tickets
.intervention
asintervention
,panichd_tickets
.status_id
asstatus_id
,panichd_statuses
.name
asstatus
,panichd_statuses
.color
ascolor_status
,panichd_priorities
.color
ascolor_priority
,panichd_categories
.color
ascolor_category
,panichd_tickets
.start_date
asstart_date
, 0-CONVERT(date_format(panichd_tickets.start_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_start_date, CASE panichd_tickets.limit_date WHEN NULL THEN 0 ELSE 1 END as has_limit,panichd_tickets
.limit_date
aslimit_date
, 0-CONVERT(date_format(panichd_tickets.limit_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_limit_date,panichd_tickets
.limit_date
ascalendar
,panichd_tickets
.updated_at
asupdated_at
,panichd_tickets
.completed_at
ascompleted_at
,panichd_tickets
.agent_id
,agent
.name
asagent_name
,panichd_priorities
.name
aspriority
,panichd_priorities
.magnitude
aspriority_magnitude
,members
.name
asowner_name
,creator
.name
ascreator_name
,panichd_tickets
.user_id
,panichd_tickets
.creator_id
,panichd_categories
.id
ascategory_id
,panichd_categories
.name
ascategory
, group_concat(panichd_tags.id) AS tags_id, group_concat(panichd_tags.name) AS tags, group_concat(panichd_tags.bg_color) AS tags_bg_color, group_concat(panichd_tags.text_color) AS tags_text_color,""
asdep_ancestor_name
, (select count() frompanichd_attachments
wherepanichd_tickets
.id
=panichd_attachments
.ticket_id
) asall_attachments_count
, (select count() frompanichd_comments
wherepanichd_tickets
.id
=panichd_comments
.ticket_id
andtype
in (reply, note, completetx) andtype
in (reply, complete, completetx, reopen) andtype
!= note) ascomments_count
, (select count() frompanichd_comments
wherepanichd_tickets
.id
=panichd_comments
.ticket_id
andtype
in (reply, note, completetx) andtype
in (reply, complete, completetx, reopen) andtype
!= note andpanichd_comments
.updated_at
> 2019-01-07 00:00:00) asrecent_comments_count
, (select count(*) frompanichd_comments
wherepanichd_tickets
.id
=panichd_comments
.ticket_id
andpanichd_comments
.type
= note) asinternal_notes_count
frompanichd_tickets
left joinusers
onusers
.id
=panichd_tickets
.user_id
left joinusers
asmembers
onmembers
.id
=panichd_tickets
.user_id
left joinusers
ascreator
oncreator
.id
=panichd_tickets
.creator_id
inner joinpanichd_statuses
onpanichd_statuses
.id
=panichd_tickets
.status_id
left joinusers
asagent
onagent
.id
=panichd_tickets
.agent_id
inner joinpanichd_priorities
onpanichd_priorities
.id
=panichd_tickets
.priority_id
inner joinpanichd_categories
onpanichd_categories
.id
=panichd_tickets
.category_id
left joinpanichd_taggables
onpanichd_tickets
.id
=panichd_taggables
.taggable_id
andpanichd_taggables
.taggable_type
= PanicHD\PanicHD\Models\Ticket left joinpanichd_tags
onpanichd_taggables
.tag_id
=panichd_tags
.id
wherecompleted_at
is null anduser_id
= 2 andhidden
= 0 anduser_id
= 2 andhidden
= 0 group bypanichd_tickets
.id
) count_row_table)
I have the same problem on a fresh install of Laravel 5.7.