cvs: pear /MDB MDB_test.php

From: Date: Wed, 05 Jun 2002 14:35:41 +0000
Subject: cvs: pear /MDB MDB_test.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4427@lists.php.net to get a copy of this message
lsmith Wed Jun 5 10:35:41 2002 EDT Modified files: /pear/MDB MDB_test.php Log: added test for new optional parameter of fetchCol that allows specifing the column to be fetched Index: pear/MDB/MDB_test.php diff -u pear/MDB/MDB_test.php:1.8 pear/MDB/MDB_test.php:1.9 --- pear/MDB/MDB_test.php:1.8 Wed Jun 5 10:11:24 2002 +++ pear/MDB/MDB_test.php Wed Jun 5 10:35:41 2002 @@ -1,7 +1,7 @@ <?php /* * - * @(#) $Header: /usr/repository/pear/MDB/MDB_test.php,v 1.8 2002/06/05 14:11:24 lsmith Exp $ + * @(#) $Header: /usr/repository/pear/MDB/MDB_test.php,v 1.9 2002/06/05 14:35:41 lsmith Exp $ * */ require_once("manager.php"); @@ -63,6 +63,12 @@ // lets just get column:0 and free the result $db->fetchCol($result, $array); echo "<br>column:<br>"; + echo Var_Dump::display($array)."<br>"; + // run the query and get a result handler + $result = $db->query($query); + // lets just get column:0 and free the result + $db->fetchCol($result, $array, DB_FETCHMODE_DEFAULT, 2); + echo "<br>get column #2 (counting from 0):<br>"; echo Var_Dump::display($array)."<br>"; // run the query and get a result handler $result = $db->query($query);

« previous php.pear.cvs (#4427) next »