writing apps for MDB 1.x with MDB 2.x in mind
| From: | Lukas Smith | Date: | Mon, 22 Sep 2003 13:11:14 +0000 |
| Subject: | writing apps for MDB 1.x with MDB 2.x in mind | ||
| Groups: | php.pear.dev php.pear.general | ||
| Request: | Send a blank email to pear-dev+get-21890@lists.php.net to get a copy of this message | ||
Hi,
well MDB 2.x is still heavily under development but now I am mostly
hunting bugs and not adding features (MDB 2.x now also has the reverse
engineering code and additionally it has a native module with getLastID
for all you autoincrement lovers).
I sort of promised a guide to how to best write apps for MDB 1.x with
MDB 2.x in mind.
I thought about it a lot and I think a lot and I guess there is not much
I can tell you aside from a quick of the top of my head list of methods
that were removed:
- get*Value($value) methods have been moved to a module. They are still
accessible through getValue(*, $value) .. this method already exists in
MDB 1.x so you should use this method
- all fetch* where * is a type have been removed, instead now you can
just use fetch if you set the result data type beforehand or you can
manually call convertValue
- Lob handling has been total reworked ..
- fetchOne has been removed in favour of making fetch() default to
column 0, row 0
- fetch[Row|Col|All] don't free the result set anymore
- pgsql and mysql now use native data types for decimal and float
- setParam and setParamArray should best be used to set parameters on a
prepared query
This list is my no means complete, but it might be helpful in reducing
the amount of changes needed to port your code to MDB 2.x
Regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com
Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin
Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07