Mysql select distinct

前端 未结 5 1890
孤街浪徒
孤街浪徒 2020-12-01 06:25

I am trying to select of the duplicate rows in mysql table it\'s working fine for me but the problem is that it is not letting me select all the fields in that query , just

5条回答
  •  眼角桃花
    2020-12-01 06:47

    You can use DISTINCT like that

    mysql_query("SELECT DISTINCT(ticket_id), column1, column2, column3 
    FROM temp_tickets 
    ORDER BY ticket_id");
    

提交回复
热议问题