Blue
White
Purple
Green
Red
Orange
Blue Light
White Light
Purple Light
Green Light
Red Light
Orange Light
SELECTpunchlist.pun_id,punchlist.pun_proj,punchlist.pun_date,punchlist.pun_desc,punchlist.pun_uid,punchlist.pun_status,punchlist.pun_priority,userprojects.ID0,userprojects.id,userprojects.project_id,userprojects.projectname,userprojects.user_id,userprojects.user_nameFROM punchlistINNER JOIN userprojects ON punchlist.pun_uid = userprojects.user_idWHERE $_SESSION["UserID"] = userprojects.user_name
The where clause in the SQL query can't contain PHP code.Remove the where clause from the SQL query and add the where clause to the "Before SQL query" event as follows:
$strWhereClause = whereAdd($strWhereClause, "userprojects.user_name ='" . $_SESSION["UserID"] . "'");