I'm developing an application locally on my machine and then I upload the changes to the server. I have MySQL 5 on my local machine. I don't know what version is on the server, phpMyAdmin doesn't say.
Here is the query:
select s.mgID, s.mgLastName, s.mgFirstName, s.mgCurrentEmploymentPhone, s.mgHomePhone, s.mgLoanType, s.mgState, s.lead_status, times_sold, DATE_FORMAT(s.mgDate,'%m/%d/%Y') AS order_date from short_loan_app s where s.lender_id = '7020' or s.mgID in (select l.mgID from lead_assign l where l.lender_id = '7020')
On the server, I get error #1064 - 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 l . mgID from lead_assign l where l . lender_id = '7020'
On my desktop, the query runs perfectly.