I am calling below query from my table to get distinct values
$data['data'] = $this->dbconn->query("SELECT DISTINCT area_name FROM actions")->fetchAll();
The $data display below data
{
"data": [
{
"0": "",
"area_name": ""
},
{
"0": "101",
"area_name": "101"
},
{
"0": "Floor 3",
"area_name": "Floor 3"
},
{
"0": "Floor 1",
"area_name": "Floor 1"
},
{
"0": "Floor 4",
"area_name": "Floor 4"
}
]
}
Why are there two entries in data array??
Am i doing something wrong ? or its a bug ?
I am calling below query from my table to get distinct values
$data['data'] = $this->dbconn->query("SELECT DISTINCT area_name FROM actions")->fetchAll();
The $data display below data