A
A
Artem2017-07-27 10:13:39
MySQL
Artem, 2017-07-27 10:13:39

Why are mysql queries returning all values ​​as strings?

There is a server on AWS and an aurora(mysql) database on RDS, the bottom line is that when a request goes to the database on RDS, all returned values ​​​​come as strings, although there are a lot of numeric fields and even if, in principle, you access any database where it was not. But if requests to RDS come from a local project or a regular VPS hosting, then everything works correctly.
I tried to correct it by changing the PDO::ATTR_STRINGIFY_FETCHES => false parameter, this has an effect on locale, but nothing changes on AWS.
The first time I encountered this. I will be glad to any ideas

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2017-07-27
@SagePtr

In pdo_mysql, if you don't set PDO::ATTR_EMULATE_PREPARES to false, all records will be returned as text.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question