Documentation TYPO3 par Ameos

testpear.php

00001 <?php
00002 /* 
00003 V4.80 8 Mar 2006  (c) 2000-2006 John Lim (jlim#natsoft.com.my). All rights reserved.
00004   Released under both BSD license and Lesser GPL library license. 
00005   Whenever there is any discrepancy between the two licenses, 
00006   the BSD license will take precedence. 
00007   Set tabs to 4 for best viewing.
00008         
00009   Latest version is available at http://adodb.sourceforge.net
00010 */
00011 
00012 error_reporting(E_ALL);
00013 
00014 include_once('../adodb-pear.inc.php');
00015 $username = 'root';
00016 $password = '';
00017 $hostname = 'localhost';
00018 $databasename = 'xphplens';
00019 $driver = 'mysql';
00020 
00021 $dsn = "$driver://$username:$password@$hostname/$databasename";
00022 
00023 $db = DB::Connect($dsn);
00024 $db->setFetchMode(ADODB_FETCH_ASSOC);
00025 $rs = $db->Query('select firstname,lastname from adoxyz');
00026 $cnt = 0;
00027 while ($arr = $rs->FetchRow()) {
00028         print_r($arr);
00029         print "<br>";
00030         $cnt += 1;
00031 }
00032 
00033 if ($cnt != 50) print "<b>Error in \$cnt = $cnt</b>";
00034 ?>


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6