I have these three tables: 

**Student**

```
student_id 012345
name       Lee
class      5A
gender     Male
nohp       011-1111111

```

**Laptop**

```
idborrow    5
student_id  012345  
no_laptop   LP12345
lend_date   01/08/2019
pass_date   NULL
send_date   01/11/2019       

```

**Pass**

```
idborrow    5
student_id  012345
no_laptop  LP12345
lend_date  01/08/2019 
pass_date  01/08/2019   
send_date  01/11/2019

```

I want to join the table in statistic (if the teacher didn’t approve):

```
student_id  012345 
name        Lee   
class       5A    
gender      Male    
nohp        011-1111111    
idborrow    5      
no_latop   LP12345 
lend_date  01/08/2019
pass_date  NULL  
send_date  01/11/2019

```

And if the teacher approve him, it would be like this:

```
student_id  012345 
name        Lee   
class       5A    
gender      Male    
nohp        011-1111111    
idborrow    5      
no_latop   LP12345 
lend_date  01/08/2019
pass_date  01/08/2019  
send_date  01/11/2019

```

I use the coding:

```
$query=”select * from student 
        inner join book on student.student_id=book.student_id”

```

However, it only showed table that pass\_date was null. And if I use:

```
$query=”select * from student 
        inner join book on student.student_id=book.student_id 
        inner join pass on book.student_id=pass.student_id”

```

It only show if it have data on pass table but didn’t show up if the pass table is null.