how codeigniter join two tables to have both Id columns |
I want to join two tables that I have both Id columns in join table by codeigniter. I want both id column from comment and users tables.
I write below code Code: $this->db->select('users.name as user_full_name, users.id as userid', false); but face error, I do not know why error: Code: Error Number: 1064 please show me how to solve it
Example:
stackoverflow - codeigniter join 2 table data What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(03-27-2019, 03:39 AM)InsiteFX Wrote: Example: Thank you for your reply I change my code as below. now i access both id from two table as different name Code: $this->db->select('*,comment.id as comment_id,users.id as userid'); |
Welcome Guest, Not a member yet? Register Sign In |