cvs: php4 /pear/DB/tests/mysql 003.phpt

From: Date: Thu, 19 Oct 2000 20:19:24 +0000
Subject: cvs: php4 /pear/DB/tests/mysql 003.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2139@lists.php.net to get a copy of this message
subjective Thu Oct 19 13:19:24 2000 EDT Added files: /php4/pear/DB/tests/mysql 003.phpt Log: I need some time to understand haw I can make a "select" Index: php4/pear/DB/tests/mysql/003.phpt +++ php4/pear/DB/tests/mysql/003.phpt <?php /** * Simple sample for a SELECT with DB * based on 002.phpt */ require_once "DB.php"; $dbh = DB::connect("mysql://localhost/test"); $dbh->setErrorHandling(PEAR_ERROR_PRINT); $res = $dbh->query("SELECT * FROM phptest"); /* test success */ if (DB::isError($res)) { die(); } /* output */ while ($row = $res->fetchRow()) { foreach($row as $key=>$val) { echo $key."=".$val."<br>"; } } ?> <hr> expect: 0=42 1=bing 2=This is a test 3=1999-11-21

« previous php.cvs (#2139) next »