note 101841 added to pdo.lobs

From: Date: Thu, 13 Jan 2011 19:11:56 +0000
Subject: note 101841 added to pdo.lobs
Groups: php.notes 
Request: Send a blank email to php-notes+get-175720@lists.php.net to get a copy of this message
I find it easier to use stream_get_contens to fetch the data of a lob using the file handle. $stmt = $pdo->con->prepare( 'select * from filetable' ); $stmt->execute(); $res = $stmt->fetchAll( PDO::FETCH_ASSOC ); for( $i=0; $i<count($res); $i++ ){ $filename = "C:/tmp/".$res[$i]['FILE_ID'].'.xml'; $content = stream_get_contents( $res[$i]['DATA_FILE'] ); file_put_contents( $filename, $content ); } ---- Server IP: 69.147.83.197 Probable Submitter: 160.62.4.10 ---- Manual Page -- http://www.php.net/manual/en/pdo.lobs.php Edit -- https://master.php.net/note/edit/101841 Del: integrated -- https://master.php.net/note/delete/101841/integrated Del: useless -- https://master.php.net/note/delete/101841/useless Del: bad code -- https://master.php.net/note/delete/101841/bad+code Del: spam -- https://master.php.net/note/delete/101841/spam Del: non-english -- https://master.php.net/note/delete/101841/non-english Del: in docs -- https://master.php.net/note/delete/101841/in+docs Del: other reasons-- https://master.php.net/note/delete/101841 Reject -- https://master.php.net/note/reject/101841 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#175720) next »