Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

111
Visualizações
How to match column value from right using PHP and MySQL

I need to fetch value from table by matching string from right. Here is my table:

db_user:

id        mobile   

1        9937229858

2        9937229867

Here I have this value $mob=+919937229858 and I need to search from table. Here I need query to search from right if any column value i.e-9937229858 is matched with $mob=+919937229858 from right then that row will be fetched. Here as per value the first row value will be fetched.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You need to use a like and concatenate a wildcard on the column value. Something like:

select * from table where ? like concat('%', mobile)

I think will do it.

over 4 years ago · Santiago Trujillo Relatório

0

You have to put % and search whit LIKE

SELECT * FROM db_user WHERE mobile LIKE '%9937229858' ;

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda