sql_seek

The sql_seek() function positions a selection resource originating from a sql_select() at the designated row number.

It accepts 4 parameters:

  1. $res, the resource,
  2. $row_number, the row number,
  3. $serveur,
  4. $option.

It is used as shown below:

if ($res = sql_select('column', 'table')) {
	if (sql_seek($res, 9)) { // go to number 10
		$r = sql_fetch($res);
		// $r['column'] of the 10th result
	}
	// return back to the start
	sql_seek($res, 0);
}

Author Mark Baber Published : Updated : 12/03/23

Translations : English, français