CodeIgniter Forums

Full Version: DataMapper ORM, join query fail
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
Hello

I installed the DataMapper ORM, it works well, but i would like to join two tabes but i don't know how to succeed.

I have one table:
name:ps_category
pk: id_category


The second table
name:ps_category_lang
pk: id_category
pk: id_shop

I just want to join to produce a sql query like: SELECT * FROM ps_category AS c LEFT JOIN
ps_category_lang AS cl ON c.id_category = cl.id_category ;

I have two model CategoryModel and Category who inherit DataMapper.
Can you please tell me how to do this?
Thank you