Never mind. I just did a search of the mySQL docs and found that "Returns" (one of my table names) is a reserved word. I changed the table name and I'm changing my code now.
I'm using the query:
--------------------------------------
SELECT ORD_ID, RETURN_ReqDate, MAX(ReturnItems.RETSTAT_ID) AS MaxRetItemStatusID, COUNT(RETITEM_ID) AS RETURN_ItemCount
FROM Returns, ReturnItems
WHERE (Returns.CUST_ID = #Session.CUST_ID#) AND (ReturnItems.RETURN_ID=Returns.RETURN_ID)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.