Sets the offset argument for the obj_paging method and is called directly from the objSQL class.
void obj_offset ( int limit )
<?php
try
{
$dbh->obj_table( "mytable" );
$dbh->obj_where( "dept='IT'" );
$dbh->obj_limit( 10 );
$dbh->obj_offset( $_GET["offset"] );
$rs = $dbh->obj_paging();
if ( $dbh->obj_error() )
throw new Exception( $dbh->obj_error_message() );
while ( $obj = $rs->obj_fetch_object() )
{
printf ( "%s %s %s \n", $obj->f_name,
$obj->l_name,
$obj->salary );
}
}
catch ( Exception $e )
{
//log error and/or redirect user to error page
}
?>
See also: obj_cols,obj_data, obj_limit, obj_order_by, obj_sort_order, obj_table, obj_where