3
You can use the SUBSTRING
to make the query return only the first 25 characters:
SELECT SUBSTRING(col_texto, 1, 25) FROM textos;
3
4
You can use the SUBSTRING
to make the query return only the first 25 characters:
SELECT SUBSTRING(col_texto, 1, 25) FROM textos;
Thank you very, very much
I tried to use in another selection query, but this time it did not run select C.id, C.card_name, C.monster_lrl, C.link_image, C.effect_description, C.card_atk, C.card_def, C.quantity, E.edition_name, E.edition_code, S.card_status_desc, A.kind_attribute, K.kind_name, M.kind_monster_name from card C inner join card_editions E on E.id = C.id_card_edition inner join kind_attributes A on A.id = C.id_kind_attributes inner join kind_card K on K.id = C.id_kind_card inner join kind_monster M on M.id = C.id_kind_monster inner join card_status S on S.id = C.id_card_status order by C.id desc limit 5
want to use in C.effect_description
When you get to the column C.effect_description
try to do: SUBSTRING(C.effect_description, 1, 25)
of the Undefined index error
I got it, I used the substr in the exhibition <?= substr($card['effect_description'], 0, 50) ?>
Browser other questions tagged php mysql characters
You are not signed in. Login or sign up in order to post.
I don’t know if I understood the question well... but I think I could handle it on the screen even using for example the Javascript Substring. https://www.w3schools.com/jsref/jsref_substring.asp
– Leonardo Paim