Welcome Guest, Not a member yet? Register   Sign In
getting data from db give wrong result when echo $row->id....
#7

[eluser]WanWizard[/eluser]
[quote author="digitaldivaradio" date="1282106876"]
Code:
$this->db->select('users.id', 'users.first_name', 'users.last_name', 'users.occupation' ');

and then I get an error when I try to echo out the $row->occupation_title (occupation title is from the occupation table, not users) with the above select.[/quote]

Which is quite logical, you haven't included a field called 'occupation_title' in your select.

You can use
Code:
$this->db->select('users.id AS row_id');
which will create $row->row_id.


Messages In This Thread
getting data from db give wrong result when echo $row->id.... - by El Forum - 08-19-2010, 01:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB