-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type binding not properly managed in PDO #41
Comments
Hi @david-garcia-garcia , to fetch numeric values as numbers rather than strings simply do this Please confirm. |
@david-garcia-garcia : Does @yitam's recommendation help? |
First and foremost, I believe the varbinary issue is already fixed by Pull Request #297. Please verify. Moreover, for numeric types and buffered queries, I don't think the problem exists anymore. Here is my simple script:
The output I got is
Without
Therefore, we will close this issue. Please feel free to reopen it if you still experience similar problems. |
This is something that's been carried along for a while, the PDO driver is incorrectly doing type binding under some situations:
When using BUFFERED QUERIES, type binding is mibehaving, all numeric types (int, smallint, etc.) are mapped to string when using fetchObject(), but even worse, these string are NULL Terminated String.
So for a "5" integer, you get a "5\0" string.
The text was updated successfully, but these errors were encountered: