NYCPHP Meetup

NYPHP.org

[nycphp-talk] PEAR DB vs successors

David Mintz vtbludgeon at gmail.com
Thu Mar 22 16:45:23 EDT 2007


On 3/22/07, Rick <rick at napalmriot.com> wrote:
>
>
> >
> > * DB had a nice autoExecute(), but its counterpart in MDB2 requires
> > you to tell it the datatype of each parameter. If I intend to use
> > MySQL and not planning to support other backends (except maybe
> > something like SQLite), is there any reason not to lie to it and say
> > that everything is 'text'?  My motivation is Laziness, shorter code,
> > less hard-coded SQL, e.g.:
> Laziness is a great motivator in many cases; this is quite possibly the
> worst though.  If you are trying to "work around" prepared queries, then
> don't use them.  Otherwise, use them right. :p  So yes, there's plenty
> of reasons not to lie to it and say everything is 'text,' especially if
> everything _isn't_ text.
>
>
Thanks for the input. I got nothing against prepared queries at all. I was
simply thinking it's nice not to have to examine every key=>value pair in
the $this->data of my example, and figure out the data type of each value.
And since MySQL lets you quote numeric data types....

I got spoiled by my old friend DB's autoExecute()

-- 
David Mintz
http://davidmintz.org/

En Nueva York el tránsito de la belleza a la desolación sucede siempre
expeditivamente, como si el principio universal de máxima eficiencia hubiera
aconsejado la supresión de gradaciones intermedias.

  -- Antonio Muñoz Molina, Ventanas de Manhattan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070322/73944dc8/attachment.html>


More information about the talk mailing list