How to compare length of data in mysql type text using php? -
this question has answer here:
- sql / mysql - order length of column 3 answers
i have table name = text_tab
_________________________ | id | message | | 1 | aaa | | 2 | bb | | 3 | ffff | | 4 | ooooooo | | 5 | gg |
i want check row data in column message
have max char. , column message
type text
.
in answer show id=4
i use order message desc not work, how can ?
have tried char_length
or length
function yet? work
select id text_tab order char_length(message) desc
instead of ordering message
column directly, order char_length
of said column.
Comments
Post a Comment