Welcome Guest, Not a member yet? Register   Sign In
Work with result in controller
#8

[eluser]TWP Marketing[/eluser]
The User Guide ( http://ellislab.com/codeigniter/user-gui...esults.htm ) says that your returned value should be an OBJECT:
Quote:...
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;
}
...

Does your customer file "zakaznik" contain the field zakaznikID?

Second thought, if the query finds NO record it will return FALSE, which could give you the error "Trying to get property of non-object".
You should add the code to test if rows were found (in the User Guide example above).


Messages In This Thread
Work with result in controller - by El Forum - 04-28-2011, 02:34 PM
Work with result in controller - by El Forum - 04-28-2011, 03:16 PM
Work with result in controller - by El Forum - 04-28-2011, 03:24 PM
Work with result in controller - by El Forum - 04-28-2011, 04:27 PM
Work with result in controller - by El Forum - 04-29-2011, 01:32 AM
Work with result in controller - by El Forum - 04-29-2011, 01:49 AM
Work with result in controller - by El Forum - 04-29-2011, 06:49 AM
Work with result in controller - by El Forum - 04-29-2011, 12:34 PM
Work with result in controller - by El Forum - 04-30-2011, 04:51 PM
Work with result in controller - by El Forum - 05-03-2011, 05:15 PM
Work with result in controller - by El Forum - 05-04-2011, 09:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB