unique content fetch in column mysql distinct and group fetch all column mysql php

MySQL 0 Comments

unique content fetch in column mysql distinct and group fetch all column mysql php

 

distinct and group rendom no add

SELECT DISTINCT name, id FROM tbl_bannerads


SELECT id, name
FROM tbl_bannerads
GROUP BY (
name
)
ORDER BY id DESC
LIMIT 0 , 30

SELECT COUNT( DISTINCT name ) AS numrows
FROM tbl_bannerads

SELECT ID, FirstName, LastName FROM table GROUP BY(FirstName)


SELECT * FROM `buy` group by date order by date DESC


SELECT * FROM buy GROUP BY date,description