Skip to content
Advertisement

Joining Query with codeigniter Model

Please help me how can I get only response where activities.activity_id = response.activity_id? here is my CI_model

My Activities table

My Response Table

My users table

Advertisement

Answer

Try with this:

You need to add aliases to the tables in order to build a more simplified and ordered query, in this case the aliases are a, b and c.

UPDATE: I fix a get method incorrectly writed when copy your code.

Check the query snippet shared here: https://extendsclass.com/mysql/526c246

I hope to be helpful

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement