[eluser]InsiteFX[/eluser]
Also I would re-read the database user guide your orderby clause should be
Note: order_by() was formerly known as orderby(), which has been deprecated.
$this->db->order_by("name", "asc");
Also num_rows should be num_rows() when checking in an if statement.
Enjoy
InsiteFX