I am going out of my mind trying to get this to work and here it is, I have 3 tables. I think it's much better to show you the tables are "tblhosting", "tblhostingconfigoptions" and "tblcustomfieldsvalues" It can be seen here in the SQLFiddle setup: I am going out of my mind trying to get this to