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

Microsoft SQL Server and MSSQL support for microseconds fix #249

Merged
merged 1 commit into from
Jul 21, 2017
Merged

Microsoft SQL Server and MSSQL support for microseconds fix #249

merged 1 commit into from
Jul 21, 2017

Conversation

hubipe
Copy link
Contributor

@hubipe hubipe commented Mar 24, 2017

This is fix for pull request #246, which introduced error datatype mismatch error for Microsoft SQL Server.

When I started using microseconds from pull request #246 on production with MSSQL, it started to failing. It was because format for datetime Y-m-d H:i:s.u was assumed by MSSQL to be type DATETIME, which only support 3 decimal numbers for microseconds. Since date in PHP uses for microseconds 6 decimals, MSSQL raised exception datatype mismatch. Therefore when using microseconds for more than 3 decimal numbers, it has to be explicitly casted to type DATETIME2, which supports microseconds for up to 7 decimal positions.

@dg dg force-pushed the master branch 20 times, most recently from 29e8b85 to fe92b3c Compare June 10, 2017 01:45
@dg dg force-pushed the master branch 3 times, most recently from cb9fd29 to 4236b80 Compare July 21, 2017 21:02
@dg dg merged commit 3d70633 into dg:master Jul 21, 2017
@dg
Copy link
Owner

dg commented Jul 21, 2017

@hubipe is seems that it fails https://ci.appveyor.com/project/dg/dibi

@hubipe
Copy link
Contributor Author

hubipe commented Jul 26, 2017

I have fixed that in commit hubipe@af40450 but don't know, how to refer it to here.

@dg
Copy link
Owner

dg commented Jul 26, 2017

Fixed, thanks

dg pushed a commit that referenced this pull request Oct 5, 2017
Pull request #249 forgot about dblib in switch
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

Successfully merging this pull request may close these issues.

2 participants