php - LEFT JOIN, ORDER BY and pagination -


the elements of list not displayed in alphabetical order. list displayed page page (pagination : page 1, page 2, page 3 ....).
used order by request returns false results.

select * structure   left join typologie     on structure.id_typologie = typologie.id_typologie    left join pays      on structure.id_pays = pays.id order nom_contact asc 

examples data:

zone attente roissy
ap-hp (archives de)
ap-hp bureau recherches
apprentis d'auteuil mecs saint-jean eudes
aptira
caroline chateau
château de la villette
chivilo (mme)
cicr genève
cicr kinshasa

where problem?

i see sorting case sensitive. change order by following:

select     s.*     structure s     left join typologie t on s.id_typologie = t.id_typologie      left join pays p on s.id_pays = p.id order     lower(s.nom_contact) asc 

that should fix problem.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -