php - How to fix sub-query in LEFT JOIN in Codeigniter? -
i tried add in join sub-query:
$this->db->join('stocks stn', 'stn.stocksidmf = (select medicalfacilities.medicalfacilitiesiduser medicalfacilities medicalfacilities.medicalfacilitiesiduser = stn.stocksidmf , stn.stocksenddate >= unix_timestamp() order stn.stocksid desc limit 1)', 'left', false);'
but codeigniter spoils query. wrong in query? may somehow replace query?
Comments
Post a Comment