Standard phpmyadmin string search sql

Asked

Viewed 73 times

2

I need to get the same result of a search in a table that returns me the same string portion and disregards the graphical accentuation of the search. inserir a descrição da imagem aqui

  • Voce wants to do this in phpmyadmin or in php?

  • if it’s by php Voce you should first remove the accents from a $string. then you should calculate the length of that string.. use php strlen() .

  • I’ll do it with php

1 answer

0


Hello, one possible solution is you run an SQL to fetch the data you want, for that go to the SQL tab of phpmyadmin and run the following query:

SELECT * from nome_da_tabela WHERE content like '%texto_vai_aqui_%';

Replace the fields:

"tableName": by the name of the table from which the data you want to search are; "text_vai_here": text you want to search for;

For accentuation redifina the collation to utf8 if the case be.

SET NAMES 'utf8';

Documentation - Character Sets, Collations, Unicode

Browser other questions tagged

You are not signed in. Login or sign up in order to post.