In my new project I decided that I will use RedBean ORM system with
Codeigniter PHP Framework.

How can I get all records from table with simple relation? I know,
that I can use R::exec or R::getAll queries but I want to make sure if
there any other solution(s).

TABLE STRUCTURE:

languages:
- id
- title

categories:
- id
- language_id
- title

Field language_id in table categories is related with id field in
table languages.

MY GOAL:

SELECT l.title, c.* 
FROM categories AS c 
LEFT JOIN languages AS l 
    ON (c.language_id = l.id) 

Your query looks fine. what is the problem you are facing

Same Query how to implement in Red bean ORM?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.