0

I have db like this : id, name, group. (Group is a slug, that I can't know for my request) So one group can have many name. I want to sort by group with php/mysql.

I want get something like this :

$request = array( 'groupeOne = array ('name')', 'groupeTwo = array()' )

Something like this. I try to order by group but it doesn't work

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
T. Dylan
  • 26
  • 4

1 Answers1

1

You can use

order by

    `group`     (using backtics  ..because group is a reserver word 

 select tid, name, `group`
 from my_table 
 order by `group`
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107