Hi I have two tables one is called project\_table and another one called investment table.

**project\_table:**

```
project_id               
project_name  
project_location         
project_phase        
project_capital      
project_total 
project_notes 
project_file 

```

**investment table:**

```
id  
project_id 
investor_id     
investment 

```

**user table:**

```
user_id
user_name
user_email
user_pass
user_role
user_phone 

```

I'm storing the investment from user in a table (investment) and linking that table to project table using project\_id

**What i need:**
Display Invested project data from a user. Means if a user login to admin they only need see they project which they have invested, Don't need to display all projects. A user may have option to invest in multiple projects.
So basically if James login to admin he only need see project which have investment from James. 

**My function for this is:** 

```
public function list_all_projects_by_userid ($uid,$investor){

    $investors = DB::fetch('SELECT * FROM  project_table JOIN investment on project_table.project_id = investment.project_id;  ORDER BY project_id DESC');
   return $investors;   

        } 

```

Buts its not working, Please help me. i am using a Extended PDO class which have a fetch method.