Welcome Guest, Not a member yet? Register   Sign In
Error on trying to join tables
#1

Hi all,

Need help, I've tried a lot of things but it doesn't work.
An image is better to understand, here my two tables
http://www.hostingpics.net/viewer.php?id...121741.png

So for a simple example, I would like to get all columns from 'client' + column 'name' from 'contact'


My actual function is :
PHP Code:
public function get_client($client_id)
 
     {

 
           $this->db->where('client_id'$client_id);
 
           $query $this->db->get('client');
 
           if($query->num_rows()!==0)
 
           {
 
                 return $query->result();
 
           }
 
           else
            
{
 
                 return FALSE;
 
           }
 
     
This function works and I would like to add the column 'name'

I tear my hair I will not have any more :-)
Reply


Messages In This Thread
Error on trying to join tables - by cybersven - 03-09-2017, 04:32 AM
RE: Error on trying to join tables - by neuron - 03-09-2017, 04:52 AM
RE: Error on trying to join tables - by InsiteFX - 03-09-2017, 04:52 AM
RE: Error on trying to join tables - by cybersven - 03-09-2017, 05:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB