Welcome Guest, Not a member yet? Register   Sign In
Extracting a Field From 1 Record Returned
#2

Why not return the row array in your model like this:

PHP Code:
return $this->db->get()->row_array(); 

Then in your view get the name like this

PHP Code:
<?php echo $propinfo['name']; ?>

OR, in your model have your function something like this and only return the name:

PHP Code:
public function get_propinfo_name($propid
{
 
     // no need for all the joins as you only want the name
      $result $this->db->select('name')
 
       ->from('proposal_info'); 
        ->where('id'$propid);
        ->get()
 
       ->row_array();

 
    if ( ! empty($result)) return $result['name'];
 
    else return FALSE;



Hope that helps,

Paul.
Reply


Messages In This Thread
RE: Extracting a Field From 1 Record Returned - by PaulD - 10-28-2017, 07:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB