Welcome Guest, Not a member yet? Register   Sign In
I am getting sql query problem in CI
#1

[eluser]MASS MASS[/eluser]
I Have two tables table_one and table_two

table_one have 3 fields
1) id
2) name
3) date

table_two have 2 fields
1) id
2) table_one_id

I am using join operation...........as shown below

code
-------

$query = $this->db->query("select * from table_one T join table_two W on T.id = W.table_one_id");


from above i am getting only table_two id(field)......i am not getting table_one id(field)
because of ....both tables contain id field same.....

what is the solution for this............


Messages In This Thread
I am getting sql query problem in CI - by El Forum - 11-23-2007, 07:50 AM
I am getting sql query problem in CI - by El Forum - 11-23-2007, 07:57 AM
I am getting sql query problem in CI - by El Forum - 11-23-2007, 08:03 AM
I am getting sql query problem in CI - by El Forum - 11-23-2007, 08:20 AM
I am getting sql query problem in CI - by El Forum - 11-23-2007, 08:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB