[eluser]John_Betong[/eluser]
[quote author="rich.a.coy" date="1265664691"]Ahh! In this case I know it's only one because I set a limit of one in the query and I'm looking up a unique user_id.
Thanks![/quote]
From the User Manual:
Code:
row()
This function returns a single result row. If your query has more than one row, it returns only the first row. The result is returned as an object. Here's a usage example:
$query = $this->db->query("YOUR QUERY");
if ($query->num_rows() > 0)
{
$row = $query->row();
echo $row->title;
echo $row->name;
echo $row->body;
}
If you want a specific row returned you can submit the row number as a digit in the first parameter:
$row = $query->row(5);
row_array()