Returns a resultset as an numeric array.
mixed obj_fetch_num ( void )
Array or null if no more rows.
<?php
try
{
$rs = $dbh->obj_select( "mytable", "color,size,price", "product='balloons'", "price" );
if ( $dbh->obj_error() )
throw new Exception( $dbh->obj_error_message() );
while ( $rs->obj_fetch_num() )
{
printf ( "%s %s %s \n", $rs->obj_field( 0 ),
$rs->obj_field( 1 ),
$rs->obj_field( 2 );
}
echo $rs->obj_num_rows();
$rs->obj_free_result();
}
catch ( Exception $e )
{
//log error and/or redirect user to error page
}
?>
See also: obj_fetch_assoc, obj_fetch_object