first of all, thank you for developing and sharing this nice framework.
I started using it a couple of months ago, and it looks very solid and fast to be learned.
Anyway, I almost immediately noticed lack of ODBC support.
I need to access a MsSQL DB Server on Windows from my linux-hosted Yii app and, after googling for a while, I realized the only way to achieve this goal is using pdo/odbc. Unfortunately, odbc schema files are missing on official Yii release.
So, we (me and my colleague) started developing Yii odbc schema files based on mssql ones.
The main issues we had to round are related the the PHP/PDO #44643 bug (all parameters are binded as TEXT by the PDO driver): the dirty trick we used to solve this is casting parameters on SQL-Side (i.e. WHERE mycol = :par becomes WHERE mycol = CAST(:par AS VARCHAR) ).
The code actually is in “works for me” state. So, I’m wondering:
Is the Yii community interested on having this patchwork included in the official Yii releases?
If 1, is there anybody who can help test/develop it against different DBMS and make it "stable"? (Actually, only MsSQL is running)
Hi, the patch applies to an old version of the framework.
We had it tested intensively for a couple of years now in prodution environment and it works without problems, but, because of lack of interest, I never managed to update it for lastest version of Yii.
You can find the patched source code (among with the full version history) here:
There is a schema for MSSQL in Yii but it uses PDO drivers. Why do you need to reimplement the schema? If you want to use pdo_odbc for connection I’ve recently made a patch for Yii to support pdo_odbc. It is tagged for 1.1.15.