如何将照片库分组并按字母顺序按升序排序? 我的代码:
$getid = $_SESSION['idSession'];
$sql = mysqli_query($mysqli, "
SELECT name_gallery
, folder
, img
, id_client
FROM alboom
WHERE id_adm = '$getid'
GROUP
BY id_client
ORDER
BY name_gallery ASC
");
我的表格结构 table struct
我的输出= test gallery01, test gallery02, test gallery03, test gallery04, test gallery05
;
我应该如何处理我的代码以按字母顺序对图像进行排序?
答案 0 :(得分:0)
我对mysql知之甚少,但它几乎与Oracle相似
SELECT name_gallery ,文件夹 ,img ,id_client 从alboom WHERE id_adm ='$ getid' 组 按名称_gallery ,文件夹 ,img ,id_client 订购 按名称_gallery “);
ASC不需要按升序排序。