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:

  1. if ($res = sql_select('column', 'table')) {
  2. if (sql_seek($res, 9)) { // go to number 10
  3. $r = sql_fetch($res);
  4. // $r['column'] of the 10th result
  5. }
  6. // return back to the start
  7. sql_seek($res, 0);
  8. }

Download

Author Mark Baber Published : Updated : 01/06/10

Translations : English, français