Display only a maximum number of characters

3

My question, I think, is quite simple, how can I do to display only a maximum number of characters for the user, for example 25 characters + "..."

The idea is to limit the characters of these texts, so that the sizes of the div's do not look so different.

    
asked by anonymous 04.08.2017 / 21:34

1 answer

4

You can use SUBSTRING to make the query return only the first 25 characters:

SELECT SUBSTRING(col_texto, 1, 25) FROM textos;
    
04.08.2017 / 21:47