Welcome Guest, Not a member yet? Register   Sign In
ANOTHER PROBLEM WITH PAGINATION
#1

[eluser]cbaldinu[/eluser]
Hi all, it's me another time. :p

Im so sorry, but im new to codeigniter and i need to learn very fast.

I was thinking if there is a method that can help me to use a pagination with a join query.

I post the code:

Code:
//After pagination code i write this

$data['records_from_db'] = $this->db->get('table_name',$config['per_page'],$this->uri->segment(3));

I know GET returns me something like
Code:
SELECT * FROM table_name

how can i do the same thing with a join like

Code:
SELECT table1.field1_1, table1.field1_2, table2.field2_1, table2.filed2_2
FROM table1 INNER JOIN table2 ON table1.id=table2.id_table1
Hope you understand me!!

Regards,


Cristian




Theme © iAndrew 2016 - Forum software by © MyBB