I see that Yii uses PDO and therefore can theoretically use Firebird and other DBs.
I installed Yii and tried to use Firebird but get an error message "CDbConnection does not support reading schema for firebird database."
I notice that in the dir …framework\db\schema there are sub-dirs for Sqlite, MySql and PgSql. Where is Firebird? Do the schema files still need to be written? Are there other obstacles to using Firebird?
The framework looks great, but I would love to use it with my favourite DB
While Yii DAO supports every DB that PDO supports, ActiveRecord only supports MySQL, SQLite and PostgreSQL currently. In order to use Firebird with ActiveRecord, you will need a schema driver. If you could write one, I would be glad to include it in the framework release.
Thanks Qiang. I understand this is an open source project and it would be good to contribute, although I’m not sure whether I would be able to find the time to achieve this
However, it might help if you could clarify a couple of things for me…
Can I use Yii without necessarily using the AR? Or, from a practical point of view, is the AR indispensible for using a DB?
If I were to attempt to write this driver, do you know of any resources which would give a flying start? For example, might you suggest that I start with the PgSql driver, or should I look at Adodb, Pear or Cake etc? Is there a list of driver requirements somewhere?
I apologise if these questions seem a bit naive, I do not have experience with this and I probably haven't done enough research before asking. However, I imagine your answers might be useful to anyone else asking about drivers for their own favourite DBs.
If you only write plain SQLs to work with DB, then AR is not needed. AR is not an indispensable part of Yii, although it is very useful.
To write a driver, please refer to an existing one, such as SQLite (framework/db/schema/sqlite). It is not a daunting task as it seems to be. Read the code and you will find it is not too hard. The only requirement is that you need have good knowledge about finding out schema information from a firebird database (that's also why I am asking you to give it a try because I have no knowledge about Firebird.)
Tried to bite in this one. Did intial look on schemas, implemetation problem only with autoincrement as Firebird uses generators (sequences) for that.
But Firebird (Windows) PDO is buggy:
So I then tried with PHP 5.3. The Firebird driver is thrown out:
Now, I can only wait?
hmm…that's not a good news…have no idea what to do…
I notice that the PDO firebird driver seems to be much better now with php 5.3. I've been trying to make some progress making a firebird schema, but I don't seem to be making much headway and any help would be sooo appreciated.