note 80127 added to ref.pdo

From: Date: Sun, 30 Dec 2007 20:57:48 +0000
Subject: note 80127 added to ref.pdo
Groups: php.notes 
Request: Send a blank email to php-notes+get-134546@lists.php.net to get a copy of this message
Be careful with PDO extends : if you use the smileaf's example, PDO will close the connection only at the end of the script, because of the "array( $this )" parameter used with the setAttribute() method. Instead, I use only this : $this->setAttribute( PDO::ATTR_STATEMENT_CLASS, array( $this->statementClassName, array() ) ); And in prepare() and query() method you can populate the "dbh" if you really need it. ---- Server IP: 69.147.83.197 Probable Submitter: 82.67.25.170 ---- Manual Page -- http://www.php.net/manual/en/ref.pdo.php Edit -- https://master.php.net/note/edit/80127 Del: integrated -- https://master.php.net/note/delete/80127/integrated Del: useless -- https://master.php.net/note/delete/80127/useless Del: bad code -- https://master.php.net/note/delete/80127/bad+code Del: spam -- https://master.php.net/note/delete/80127/spam Del: non-english -- https://master.php.net/note/delete/80127/non-english Del: in docs -- https://master.php.net/note/delete/80127/in+docs Del: other reasons-- https://master.php.net/note/delete/80127 Reject -- https://master.php.net/note/reject/80127 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#134546) next »