[nycphp-talk] PEAR::DB prepare() and executeMultiple()
Daniel Convissor
danielc at analysisandsolutions.com
Tue Mar 22 14:47:43 EST 2005
On Tue, Mar 22, 2005 at 01:23:00PM -0500, Jeff Loiselle wrote:
>
> I had thought that using prepare() and execute() increased portability
> due to this line in the documentation:
>
> "Another place prepare/execute is useful is supporting databases which
> have different SQL syntaxes."
Yeah. But that portability can be obtained using the quoteSmart() method
directly. Though, in most cases, you can just put in integers as unquoted
and strings as quoted with single quotes and you don't have to worry about
portability. The trick comes in two places: strings that need escaping
due to "'" or "\" in them and booleans.
--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
More information about the talk
mailing list