Process result from DB in Controller |
[eluser]mrpaco85[/eluser]
If you're looking for a single value, you might want to use $query->row() instead. Otherwise, you will have to iterate get_Geo_Location_Latitude() in order to get at a specific value. The row() function will return an object with your selected columns as attributes of that object. In your model: Code: function get_Geo_Location_Latitude() In your controller: Code: $latitude = $this->model_home->get_Geo_Location_Latitude(); $latitude now has the value you are looking for. Also, see http://ellislab.com/codeigniter/user-gui...sults.html for more information on generating query results. |
Messages In This Thread |
Process result from DB in Controller - by El Forum - 07-25-2011, 05:42 PM
Process result from DB in Controller - by El Forum - 07-26-2011, 09:48 AM
|