Q
Q
qwon2018-06-07 18:01:12
Yii
qwon, 2018-06-07 18:01:12

How to implement yii2 alphabetical index?

Good day to all. There is a book table with fields: id, title, id_author, id_pub and so on, which are not particularly important.
There is also an author table with fields: id, fio. The page must be displayed in alphabetical order. It's not entirely clear how to do this. I would appreciate information that can help. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2018-06-07
@webinar

->orderBy('some_field ASC')
sql order by

D
Dmitry Kim, 2018-06-07
@kimono

I recently answered a similar question:
Outputting data from MySql?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question