Skip to content
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

SQLSRV_ATTR_FORMAT_DECIMALS does not work using SQLSRV_CURSOR_BUFFERED #1525

Open
DAdq26 opened this issue Nov 7, 2024 · 0 comments
Open

Comments

@DAdq26
Copy link

DAdq26 commented Nov 7, 2024

PHP version 8.3

PHP PDO_SQLSRV version 5.12 with doctrine dbal

SQL Server version 2022 linux

Client operating system linux

Table schema

Problem description
When using db cx with option SQLSRV_ATTR_FORMAT_DECIMALS to true,
When i prepare statement with following attributes
[PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL, PDO::SQLSRV_ATTR_CURSOR_SCROLL_TYPE => PDO::SQLSRV_CURSOR_BUFFERED]

to get decimal from db
Leading 0 on decimal are missing

If i remove PDO::SQLSRV_ATTR_CURSOR_SCROLL_TYPE => PDO::SQLSRV_CURSOR_BUFFERED and fallback to defaut SQLSRV_ATTR_CURSOR_SCROLL_TYPE value the leading 0 is well added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant