Re: pdo prepare()

From: Date: Fri, 30 Sep 2005 13:59:42 +0000
Subject: Re: pdo prepare()
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-3027@lists.php.net to get a copy of this message
It depends on the driver, but in general, when you call a PDO method, the underlying equivalent of that method does happen. You're probably running your code against a driver where PDO emulates the functionality. PDO and its drivers don't necessarily know if prepare is to be emulated until you actually attempt to prepare. Why do you need to know? --Wez. On 9/30/05, Lukas Smith <lsmith@php.net> wrote: > Hi, > > It seems to me like prepare() does not actually prepare the query in the > database? Instead it seems to wait until I do the first execute()? This > seems to delay the actual error in a slightly confusing way imho. > > Furthermore is there an effective way to determine if prepared > statements will be emulated or not. Of course I can determine this from > the db type + server information, but is there a direct way to get this > information (I guess this is starting to go into the direction of JDBC > where you can query the driver what it supports)? > > regards, > Lukas > > PS: I presume Adain will open a bug report on this .. but it seems like > a failed query() will return false, but there is no error message > generated that can be read via errorCode()/errorInfo() > > -- > PECL development discussion Mailing List (http://pecl.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.pecl.dev (#3027) next »