I was trying to retrieve a data result provided by the SQL below
SELECT to_char(generate_series('2016-10-04', '2016-12-31', interval '1 mon'), 'YYYY-MM') AS month
If we can run the said query above, it will return a result of:
month(text)
"2016-10"
"2016-11"
"2016-12"
but in my php code, it does not return any result or values are null
$qr = "SELECT to_char(generate_series('2016-10-04', '2016-12-31', interval '1 mon'), 'YYYY-MM') AS month";
$rs = $this->conn->fetchAll($qr);
print_r($rs);
result:
Array
(
)
other sql queries in my php code works but this one is not, am i missing something here? i need a shade on this T_T
$this->conn
, what is your underlying RDBMS API ?