У меня есть таблица в базе данных с именем posts
, в которой есть пять столбцов с именем
id, title , author , cata , content
* Ката означает категории
Я хочу получить 10 строк данных разных категорийкак
$sql = "select * from `posts` by distinct cata";
что-то вроде.
например, я хочу этот результат
1.this is gaming posts author(Mauk) cata(Gaming) content......
2.this is glossary posts author(Mauk) cata(glossary) content......
3.this is shoes posts author(Mauk) cata(shoes) content......
4.this is garments posts author(Mauk) cata(garments) content......
5.this is you tube posts author(Mauk) cata(YouTube ) content......
6.this is blogging posts author(Mauk) cata(blogging ) content......
7.this is editing posts author(Mauk) cata(editing) content......
8.this is electronics posts author(Mauk) cata(electronics) content......
9.this is programming posts author(Mauk) cata(programming ) content......
10.this is news posts author(Mauk) cata(news) content......
пожалуйста, помогите мне.
нет