I have json array as below

```
$q=[{"con0":0},{"con1":1},{"con2":2}]

```

I want to pass this array to select query where query is as follows

```
$query="select * from table_name where con0='0' and con1='1' and con2='2'";

```

Shall we use json array to create this query?