During the development of a project we ran into a problem when using mssql_query()
on a Microsoft SQL Database table with a column of a datatype `smalldatetime`.
It would appear PHP was returning a dataset from MSSQL but was not allowing the script to continue processing even though a valid dataset was returned. After some digging we found a bug on the PHP website, inherently there was a short term fix which is to disable the converting of MS SQL `smalldatetime` to a PHP date.
Disabling the converting of a MSSQL datetime to a PHP date was quite simple;
ini_set('mssql.datetimeconvert', 0);
I hope this finds someone well.
Posted in Development
Get the latest eCommerce news, reviews and expert advice in your inbox.
To find out more about how we use your data, read our Privacy Policy