The sql_fetch_all() function returns an array containing all of the rows for a selection resource. Since all of the results will be stored in current memory, you should be careful not to select too much content at once.
The sql_fetch_all() function accepts 3 parameters:
-
$resis the resource obtained using an sql_select(), -
$serveur, -
$option.
It is used as in the example below:
$res = sql_select('column', 'table');
$all = sql_fetch_all($res);
// $all[0]['column'] is the first row
However, this function is not often used, since the sql_allfetsel() function can execute much the same operation but also with selection parameters:
$all = sql_allfetsel('column', 'table');
// $all[0]['column'] is the first row