Location: PHPKode > projects > SportsPHool > sportsphool/includes/adodb/test3.php
<code>
<?php
/*
  V1.40 19 September 2001 (c) 2000, 2001 John Lim (hide@address.com). All rights reserved.
  Released under both BSD license and Lesser GPL library license. 
  Whenever there is any discrepancy between the two licenses, 
  the BSD license will take precedence.
  Set tabs to 8.
 */
#test Move
include("adodb.inc.php");	

$c1 = &ADONewConnection('postgres');
if (!$c1->PConnect("susetikus","tester","test","test")) 
	die("Cannot connect to database");

# select * from last table in DB
$rs = $c1->Execute("select * from adoxyz order by 1"); 

$i = 0;
$max = $rs->RecordCount();
if ($max == -1) "RecordCount returns -1<br>";
while (!$rs->EOF and $i < $max) {
	$rs->Move($i);
	print_r( $rs->fields);
	print '<BR>';
	$i++;
}
?>
</code>
Return current item: SportsPHool