[TYPO3-core] RFC #15457: Add support for prepared queries

Jigal van Hemert jigal at xs4all.nl
Mon Aug 16 10:28:42 CEST 2010


Hi Xavier,

On 15-8-2010 21:31, Jigal van Hemert wrote:
> I just found my PHP4 PDO class in an old archive. I'll look up if that
> implementation replaces the markers correctly. Maybe there are a few
> useful parts in that class. More tomorrow morning...

Attached my ancient class :-) Remember, it's PHP4 code from four years 
ago and not written with TYPO3 CGL in mind ;-)
Because PHP4 didn't support class constants I renamed PDO::PARAM_STR to 
PDO__PARAM_STR to make the transition to real PDO a matter of search and 
replace.

Anyway, bindParam in my class is pretty bad actually. It's nothing more 
than a shell around bindValue. It should replace the values just prior 
to execution and not when bindParam is called. Furthermore I noticed 
that I also replaced the same marker more than once and I didn't take 
into account that it can only be replaced in certain places in the query.

It's important to make the functions act like the "real" PDO module, 
because it could cause incompatibilities when PDO is used in the code.

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _class_PDO.inc.zip
Type: application/x-zip-compressed
Size: 9481 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100816/1658f1ec/attachment.bin>


More information about the TYPO3-team-core mailing list