I am getting this error when I try to open the list page, based on a custom view
Error type 256
Error description 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 '='167')' at line 1
URL intranet/staff/detest/v_det_by_tut_list.php?
Error file E:\wwwroot\Intranet\staff\detest\include\dbconnection.php
Error line 26
SQL query select detentions.DayForDetention, detentions.Sess, detentions.Department, detentions.Done, detentions.MoveToHOD, detentions.OriginalDate, detentions.DoneAtDept, detentions.DatewithHOD, nd_pupils.ID_pup, concat(nd_pupils.Surname, " ", nd_pupils.Forename) AS Student, concat(left(nd_staff.firstname, 1), " ", nd_staff.lastname) AS `Run By`, concat(left(nd_staff1.firstname, 1), " ", nd_staff1.lastname) AS `Given By`, detentions.DateGiven, detentions.Date2SLT, detentions.ID, reasons.reason FROM detentions INNER JOIN nd_pupils ON detentions.Detainee = nd_pupils.ID_pup INNER JOIN nd_staff ON detentions.Owner = nd_staff.userid INNER JOIN reasons ON detentions.Reason = reasons.idReason INNER JOIN nd_staff AS nd_staff1 ON detentions.Origin = nd_staff1.userid where (detentions.Done =0 ) and (='167') ORDER BY detentions.Owner
Solution This is a general error. It occurs when there is an error in event code or in SQL.