daily pastebin goal


a guest Jun 13th, 2014 215 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [SELECT DISTINCT ticket.ticket_id,lock_id,ticketID,ticket.dept_id,ticket.staff_id,ticket.team_id  ,ticket.subject,ticket.name,ticket.email,dept_name  ,ticket.status,ticket.source,isoverdue,isanswered,ticket.created,pri.*  ,count(attach.attach_id) as attachments  ,count(DISTINCT thread.id) as thread_count  ,IF(ticket.duedate IS NULL,IF(sla.id IS NULL, NULL, DATE_ADD(ticket.created, INTERVAL sla.grace_period HOUR)), ticket.duedate) as duedate  ,IF(ticket.reopened is NULL,IF(ticket.lastmessage is NULL,ticket.created,ticket.lastmessage),ticket.reopened) as effective_date  ,CONCAT_WS(" ", staff.firstname, staff.lastname) as staff, team.name as team  ,IF(staff.staff_id IS NULL,team.name,CONCAT_WS(" ", staff.lastname, staff.firstname)) as assigned  ,IF(ptopic.topic_pid IS NULL, topic.topic, CONCAT_WS(" / ", ptopic.topic, topic.topic)) as helptopic   FROM ost_ticket ticket  LEFT JOIN ost_department dept ON ticket.dept_id=dept.dept_id  LEFT JOIN ost_ticket_priority pri ON (ticket.priority_id=pri.priority_id)  LEFT JOIN ost_ticket_lock tlock ON (ticket.ticket_id=tlock.ticket_id AND tlock.expire>NOW()
  2.                   AND tlock.staff_id!=5)  LEFT JOIN ost_ticket_attachment attach ON (ticket.ticket_id=attach.ticket_id)  LEFT JOIN ost_ticket_thread thread ON ( ticket.ticket_id=thread.ticket_id)  LEFT JOIN ost_staff staff ON (ticket.staff_id=staff.staff_id)  LEFT JOIN ost_team team ON (ticket.team_id=team.team_id)  LEFT JOIN ost_sla sla ON (ticket.sla_id=sla.id AND sla.isactive=1)  LEFT JOIN ost_help_topic topic ON (ticket.topic_id=topic.topic_id)  LEFT JOIN ost_help_topic ptopic ON (ptopic.topic_id=topic.topic_pid)   WHERE (   ticket.staff_id=5 OR ticket.dept_id IN (1,6,5,7,8,9,10,11,12,13) OR ticket.team_id IN(1)  ) AND status='closed'  GROUP BY ticket.ticket_id ORDER BY ticket.closed DESC, ticket.created DESC LIMIT 0,50]
  4. Malformed packet
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand