Re: DB Package with Oracle and SELECT * FROM

From: Date: Tue, 13 Dec 2005 17:36:24 +0000
Subject: Re: DB Package with Oracle and SELECT * FROM
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22242@lists.php.net to get a copy of this message
Quoting Craig Constantine <craig@blurfl.com>:
--On Tuesday, December 13, 2005 9:20 AM +0100 Franck Collins <franck@collins.fr> wrote:
with the query: "SELECT title, country FROM table_test", the script don't show the error but it continue to run... It never stop and never show the result! Very strange
Can you post (or just email me) the code you're running? (I started following-along/helping in the middle of your conversation, and I don't think I've seen any code.) -c Ok, here is my code:
<?php require_once 'DB.php'; Putenv("ORACLE_HOME=/opt/Oracle/product/9.2.0.4/OraHome1/"); $dsn = 'oci8://user:pass@TNS'; $options = array(
   'debug'         => 2,
'portability' => DB_PORTABILITY_ALL, ); $db =& DB::connect($dsn, $options); if (PEAR::isError($db)) { die($db->getDebugInfo()); } $res =& $db->query('SELECT * FROM test_table'); if (DB::isError($res)) { die($res->getDebugInfo()); } while ($row =& $res->fetchRow()) { echo "Val -> " . $row[0] . "<br />"; } ?>
-- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.

« previous php.pear.general (#22242) next »