--> Query failed : 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 'and A.VersionID = 1 and A.State > 2 and A.State < 11
order by A.OrderDate DE' at line 11 SELECT A.ID, B.FirstName, B.LastName, A.EndUser, D.Company, C.FirstName, C.LastName, C.Phone1, C.EMail,
E.Company, E.FirstName, E.LastName, E.Phone1, E.EMail, A.OrderDate, F.Name, G.Name, G.ID, A.PONumber, H.Name
FROM fl_online_orders as A
left join fl_user_address as B on A.CreateBy = B.UserID and B.TypeID = 1
left join fl_user_address as C on A.EndUser = C.UserID and C.TypeID = 1
left join fl_user_login as D on A.EndUser = D.UserID
left join fl_online_orders_enduser as E on A.ID = E.ID
left join fl_online_orders_types as F on A.TypeID = F.ID
left join fl_online_orders_states as G on A.State = G.ID
left join fl_online_orders_lead_time as H on A.LeadTime = H.ID
where A.CreateBy = and A.VersionID = 1 and A.State > 2 and A.State < 11
order by A.OrderDate DESC