[nycphp-talk] PEAR::DB prepare() and executeMultiple()
Jeff Loiselle
jeff.loiselle at gmail.com
Mon Mar 21 11:42:26 EST 2005
Thank you very much Dan. I knew you'd pipe up to correct me sometime.
:-) That's exactly what I am doing now. I am still using prepare() and
execute() with PHP variables, even though there is only one query per
table because I sense that doing that is still more portable than
issuing query() directly?
On Mon, 21 Mar 2005 11:13:13 -0500, Daniel Convissor
<danielc at analysisandsolutions.com> wrote:
> On Mon, Mar 21, 2005 at 10:48:24AM -0500, Jeff Loiselle wrote:
> > On Fri, 18 Mar 2005 17:31:39 -0500, Brian Kaney <brian at vermonster.com> wrote:
> > > On Fri, 2005-03-18 at 17:24, Jeff Loiselle wrote:
> > > >
> > > > DELETE FROM ? WHERE DOC_ID=? [nativecode=ORA-00903: invalid table name]
> > >
> > > DELETE FROM ! WHERE DOC_ID=?
> >
> > that doesn't seem to cure the problem.. i'll be looking into it more today
>
> The process of preparing a query involves checking identifiers for
> validity and then remembering the query framework in a native format for
> later execution. This speeds up execution of frequently used queries
> because they don't need to go through the identifier checks and compiling
> each time. Thus, you can't substitute a table or column name this way.
>
> You'll need to make a regular query in which you compose the query string
> using a PHP variable.
>
> --Dan
>
> --
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> data intensive web and database programming
> http://www.AnalysisAndSolutions.com/
> 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
>
--
---
Jeff Loiselle
Web Developer, Musician, and Observer
http://jeff.loiselles.com
More information about the talk
mailing list