You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're running into issues while testing on mySQL8 whereby we're getting errors like:
Error: Incorrect DATE value: ''"
when passing a query like "select * from table where datecol='2019-04-01'". Our first inclination was it was a sql_mode problem (as that what most google hits lead), except the date value we're using in the where statement is valid.
After a good deal of debugging we believe it has to do with query being passed in without an explicit ability to indicate the client's charset. For example, when using a PDO connection and a DSN string like the following:
I agree sending a SET NAMES "utf8mb4" query is probably a good idea 👍
We've successfully used this library to send UTF-8 data back and forth with MySQL. I don't see how this could be related to the error you're seeing otherwise.
I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can always reopen this 👍
Hello,
We're running into issues while testing on mySQL8 whereby we're getting errors like:
Error: Incorrect DATE value: ''"
when passing a query like "select * from table where datecol='2019-04-01'". Our first inclination was it was a sql_mode problem (as that what most google hits lead), except the date value we're using in the where statement is valid.
After a good deal of debugging we believe it has to do with query being passed in without an explicit ability to indicate the client's charset. For example, when using a PDO connection and a DSN string like the following:
$dsn="mysql:host=" .$shard_host.";port=".$shard_port.";dbname=mysql;charset=utf8";
The proper result is returned. However if we convert this to the URI format required for this library:
$uri=user:pass@host:port/mysql
We receive the error mentioned above.
We also tried:
$uri=user:pass@host:port/mysql?charset=utf8
to see if this might work, but it does not. How can we explicitly set the client charset so that the server interprets this correctly?
The text was updated successfully, but these errors were encountered: