The sql_getfetsel()
function retrieves the single column requested from the first row of the selection. It accepts the same parameters as the sql_select()
function and is a short-cut for the combination of calling sql_fetsel()
and array_shift()
.
Its parameters are:
-
$select
nominating the desired column, -
$from
, -
$where
, -
$groupby
, -
$orderby
, -
$limit
, -
$having
, -
$serveur
, -
$option
.
It is used as shown below:
$colonne = sql_getfetsel('colonne', 'table', 'id_table=' . intval($id_table));
Note that an alias can also be defined as shown here:
$alias = sql_getfetsel('colonne AS alias', 'table', 'id_table=' . intval($id_table));