How to Create INNER JOIN query in datamapper in codeigniter?
Country : id(int) | Name(varchar)
User : id(int) | name(varchar) | country_id(int)
Required Query
SELECT * FROM User u INNER JOIN Country c ON(c.id = u.country_id) WHERE u.name LIKE %abcd%
You have to set the properties in you Model accordingly:
Official Doc
You then can query related models like this:
You can find all query-options here