In my mode I am selecting a field as
$query1 = $this->db->query("SELECT dPassword
FROM tbl_login
WHERE dEmailID='a@a.in'");
How to return dpassword as a variable to my controller
I tried this way return dpassword;
The following is also fine:
Then if your query was to return more than a single row you could operate on the results like so:
For single row results i usually return the row directly from the model like so:
Here is an example of this:
Or for a query expected to return multiple results i return the entire results object: