Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8156835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:04:46+00:00 2026-06-06T17:04:46+00:00

I have an autocomplete field where user can enter lastname firstname middlename in the

  • 0

I have an autocomplete field where user can enter lastname firstname middlename in the same order.

Using lastname firstname middlename (as a term) I have to show the autocomplete dropdown.

On my database I have 3 columns for firstname lastname and middlename. Now I have to compare 3 column values (asc_lastname, asc_firstname, asc_middlename) of same row with user input (term).

Here is the SQL query. Please correct my mistake.

$rs = mysql_query( "select asc_lastname, asc_firstname, asc_middlename from issio_asc_workers INNER JOIN issio_workers_asc_sc_list 
ON  issio_asc_workers.lname_fname_dob=issio_workers_asc_sc_list.lname_fname_dob where issio_workers_asc_sc_list.center_id='$cid' 
AND issio_workers_asc_sc_list.center_user_type = '31' AND issio_workers_asc_sc_list.center_status <> 'deleted' AND 
(issio_asc_workers.asc_lastname+' '+issio_asc_workers.asc_firstname+' '+issio_asc_workers.asc_middlename) 
LIKE '". mysql_real_escape_string($term) ."%'  ORDER BY issio_asc_workers.lname_fname_dob ASC LIMIT 0,10");

Is it possible to compare 3 column values at a time using a SQL query like

 select * 
 from table 
 where (column1+''+column2+''column3) like 'this is good'

Sorry for my poor sentences.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:04:49+00:00Added an answer on June 6, 2026 at 5:04 pm

    Try this query:

    SELECT * FROM your_table WHERE CONCAT(column1, ' ', column2, ' ', column3) LIKE '%this is good%'
    

    Documentation for CONCAT

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have an autocomplete field where a user can select an existing or
I have an input field that uses Autocomplete to show a list of possible
I've got an input field, which's using the jQuery autocomplete method. The user starts
I have a jQuery Autocomplete field on an ASP.Net Webform and everything has been
I have an jQuery.autocomplete field presenting a limited range of decimal numbers. Ex: var
I have a simple autocomplete field that spits out a bunch of suggested words
I have a jquery autocomplete field working fine followed by a date input field.
I have a huge autocomplete field with a list of exams. This field prepends
So I have a field address in open.php, when a user starts to write
I am using jqueryui autocomplete widget for autocompleting a 'country' field but I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.