I am receiving the following error and I cannot seem to figure out the culprit. Any thoughts? I can provide additional code/info if necessary, just lmk. Thanks!
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 'SELECT TimeId FROM TimeSheetPending WHERE TimeBilled = 'no' ))
... $bothQuery .= " FROM TimeSheet, Clients, Jobs, BillCat, Users WHERE TimeSheet.TimeBilled = 'no' AND Clients.ClientId = TimeSheet.TimeClient AND Jobs.JobId = TimeSheet.TimeJob AND BillCat.BillCatId = TimeSheet.TimeBillingCat AND Users.Login = TimeSheet.TimeUser AND (Jobs.JobId = '$_POST[job]' OR Jobs.JobId = '$_GET[jobID]') AND TimeSheet.TimeId != (SELECT TimeSheetPending.TimeId FROM TimeSheetPending WHERE TimeSheetPending.TimeBilled = 'no' )"; $bothQuery .= ") UNION ("; ...