i have created a clone of java's jdbc, the api is same as java 1.5
please try it out. you will have to use the sql package:
i have used in plenty corporate level projects, and its going solid! i believe this is one of the most complete database layers in php available.
Hmm, I don't mean to sound nasty, but why do we need *ANOTHER* database layer for PHP?
We've already got PDO (now a part of the PHP core since 5.1, and the best one for new work IMHO), as well as the older PEAR::DB and ADODB (Not Microsoft ADO).
of course we have plenty of the db layers, and as you mentioned pdo etc. this is something that will come handy for java developers, as it follows 100% same api as jdbc, one wouldnt have to browse through manuals of pdo or pear to familiarise themselves. existing knowledge of jdbc for java developers migrating to php will make this an easy move.
regarding pdo, i dont think it provides as much detailed results or control as this jdbc clone does. if you use both, you would know what i mean.
It's hard to say whether PDO has the same level of control as JDBC, I guess it probably depends on the driver.
As for things such as different types of server-side cursor etc, PDO *may* support them, it's really down to the driver. There are driver-specific options which can be used.
Personally I'd say that PDO is a lot simpler than JDBC, but it supports at least *most* of the same stuff (per driver). Specificially, PDO does support server side cursors and prepared statements (as JDBC does).
I've not read the source code for any JDBC drivers, but I strongly suspect that a lot of the functionality in JDBC is emulated by most drivers anyway (Maybe some of them implement them using server-side stored procedures etc). Stuff like updateable result sets.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)