I'm running MySql version 5.5.32-cll and trying to export subset of queried data but end up exporting the whole query
I'm running the following query:
SELECT q1.value,c.id,c.companyname,c.address1,c.address2,c.city,c.state,c.postcode,CONCAT(c.firstname , " " , c.lastname),c.phonenumber
FROM tblclients c LEFT OUTER JOIN
(SELECT cf.id,cfv.relid,cf.fieldname,cfv.value FROM tblcustomfields cf INNER JOIN tblcustomfieldsvalues cfv ON cf.id = cfv.fieldid WHERE cf.fieldname = "AccountCode") q1
ON c.id = q1.relid
Can somebody advise where i'm going wrong. Do i need to add any additional text to just export the subset?