[sql]
SELECT SUBSTRING( monchamp, 1, 1 ) AS lettre FROM mabase GROUP BY lettre

On créer notre requête avec magixLayer et on utilise ensuite la class magixPagination pour faire le travail de génération des lettres.

[code]
pagerString(paramsletters,request,key,url);
[PHP]
if(magixcjquery_filter_request::isGet('letters'){
        $letters = ctype_alpha($_GET['letters'])?$_GET['letters']:false;
}
$layer = new magixcjquery_magixdb_layer();
$sql = 'SELECT SUBSTRING( monchamp, 1, 1 ) AS lettre FROM mabase GROUP BY lettre';
$request = $layer->select($sql);
$pager = new magixcjquery_pager_pagination();
print $pager->pagerString($letters,$request,'lettre');