PDO without JSON support

4

I need to return a row in JSON, but the PDO does not seem to give full support to operations. Always the type 245 error message.

  

PDO :: prepare (): Unknown type 245 sent by the server. Please send a report to the developers

I tested the PDO with a simple select SELECT JSON_ARRAY('a', 1, NOW()) and I only get the error without further descriptions, nor did I find anything in the DOC. The same select on the command line in MYSQL returns what is expected:

  

["a", 1, "2017-07-18 00: 11: 06.000000"]

Does anyone have a reference to help solve this?

    
asked by anonymous 18.07.2017 / 05:19

1 answer

2

As you can see in bug tracking # 70384 , has been fixed in PHP-5.6, PHP- 7.0 and master (PHP-7.1).

What you can do to resolve momentarily is CAST in return JSON :

SELECT CAST(JSON_ARRAY('a', 1, NOW()) AS CHAR(255))
    
18.07.2017 / 13:02