cvs: pear /MDB MDB_pear_wrapper_test.php

From: Date: Wed, 12 Jun 2002 13:09:33 +0000
Subject: cvs: pear /MDB MDB_pear_wrapper_test.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4571@lists.php.net to get a copy of this message
lsmith Wed Jun 12 09:09:33 2002 EDT Modified files: /pear/MDB MDB_pear_wrapper_test.php Log: added a sample delete statement Index: pear/MDB/MDB_pear_wrapper_test.php diff -u pear/MDB/MDB_pear_wrapper_test.php:1.4 pear/MDB/MDB_pear_wrapper_test.php:1.5 --- pear/MDB/MDB_pear_wrapper_test.php:1.4 Fri May 17 13:47:18 2002 +++ pear/MDB/MDB_pear_wrapper_test.php Wed Jun 12 09:09:32 2002 @@ -1,7 +1,7 @@ <?php /* * - * @(#) $Header: /usr/repository/pear/MDB/MDB_pear_wrapper_test.php,v 1.4 2002/05/17 17:47:18 lsmith Exp $ + * @(#) $Header: /usr/repository/pear/MDB/MDB_pear_wrapper_test.php,v 1.5 2002/06/12 13:09:32 lsmith Exp $ * */ require_once("pear_wrapper.php"); @@ -19,7 +19,7 @@ // or a Pear DB Error object on error // You can also set to TRUE the second param // if you want a persistent connection: - // $db = DB::connect($dsn, true); + // $db = DB::connect($dsn, TRUE); $db = DB::connect($dsn); // With DB::isError you can differentiate between an error or // a valid connection. @@ -97,8 +97,10 @@ echo "<br>see getAll in action:<br>"; echo Var_Dump::display($db->getAll("SELECT * FROM test"))."<br>"; echo "<br>see getAssoc in action:<br>"; - echo Var_Dump::display($db->getAssoc("SELECT * FROM test", false, "", DB_FETCHMODE_ASSOC))."<br>"; + echo Var_Dump::display($db->getAssoc("SELECT * FROM test", FALSE, "", DB_FETCHMODE_ASSOC))."<br>"; echo "tableInfo on a string:<br>"; echo Var_Dump::display($db->tableInfo("numbers"))."<br>"; + echo "<br>just a simple delete query:<br>"; + echo Var_Dump::display($db->query("DELETE FROM numbers"))."<br>"; $db->disconnect(); ?>

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