Re: Standard DBI Proposal



Donal K. Fellows wrote:
I want to make databases easy to use. If that means it's a bit harder to
write the interface, so be it.

It would be nice, but how do you handle code like
if ("" != $_GET['name'])
$sql .= "WHERE name like '" . esc($_GET['name']) . "%' AND ";
(Yes, it's PHP. Deal. :-)

I often do this sort of thing with a dozen different form fields, building up a query clause by clause. If I had only prepared statements, would I need 2^N statements?

--
Darren New / San Diego, CA, USA (PST)
Remember the good old days, when we
used to complain about cryptography
being export-restricted?
.



Relevant Pages

  • Re: Standard DBI Proposal
    ... I often do this sort of thing with a dozen different form fields, ... building up a query clause by clause. ... If I had only prepared statements, ... this is the SQLite approach. ...
    (comp.lang.tcl)
  • Re: Standard DBI Proposal
    ... building up a query clause by clause. ... If I had only prepared statements, ... you discover two months into a project that a title field needs to be ... validation, including length checking, prior to insert, right?) ...
    (comp.lang.tcl)