Question: I have an unanswerable sql query with 'inner join'. The result is not come as I expect. Even, I remove the 'inner join' - the result is also include everything - like the 'inner join' does.

What to do if I only wants the result comes from these conditions?

1. **prop\_type='5'**
2. **not** prop\_price='0'
3. prop\_price2='0'
4. prop\_price3='0'

Mysql:

```
select prop_lang, prop_type, prop_for, 
ppix_cover,prop_price,prop_price2,prop_price3 
from prop_db 
inner join prop_pix on prop_db.prop_sid=prop_pix.prop_sid 
where prop_db.prop_type='5' 
and prop_db.prop_lang='1' 
and prop_pix.ppix_cover='1' 
and prop_db.prop_for='1' or prop_db.prop_for='0' 
and prop_price3='0' 
and prop_price2='0' 
and not prop_price='0' 
group by prop_db.prop_sid 
order by prop_db.prop_id 
LIMIT 0, 9

```

This is the result from the query above.

[![enter image description here](https://i.stack.imgur.com/VjmBC.jpg)](https://i.stack.imgur.com/VjmBC.jpg)

As you see, the column 'prop\_type' comes up with other value which I don't expected. And also the first row comes up with **price2** and **price3** that not ='0'.

What should I do to make the result show as the conditions above?

Answer: 
This post might help [How do I authorise an app (web or installed) without user intervention? (canonical ?)](https://stackoverflow.com/questions/19766912/how-do-i-authorise-an-app-web-or-installed-without-user-intervention-canonic) , specifically the reference to <https://developers.google.com/identity/protocols/OAuth2WebServer#offline>
Yes. Error [411](https://cloud.google.com/storage/docs/json_api/v1/status-codes#411_Length_Required) means that you must provide the Content-Length HTTP header. This error has no response body. Try to remove the Content-Length part from your header array. 

> 
> 
> ```
> //remove following
> $header[] = 'Content-Length: ' . $length;
> 
> ```
> 
> 

From this [SO thread](https://stackoverflow.com/questions/9476253/411-error-even-though-content-length-is-there), cURL adds it automatically. So you don't need to send that.