Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

109
Views
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 answers
Answer question

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 Report

0

You have to put % and search whit LIKE

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

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!