title: How to use group by and order by
body: <p>How can I group a photo gallery and sort them alphabetically in ascending order?
  my code:</p>
  
  <pre><code>$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
  ");
  </code></pre>
  
  <p>my table struct
  <a href="https://i.stack.imgur.com/JJvnA.jpg" rel="nofollow noreferrer">table struct</a></p>
  
  <p>my output = <code>test gallery01, test gallery02, test gallery03, test gallery04, test gallery05</code>;</p>
  
  <p>How should I do for my code to sort images in alphabetical order?</p>