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

  • Home
  • SEARCH
  • 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 514547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:32:10+00:00 2026-05-13T07:32:10+00:00

I asked this question about a year ago on another site but never got

  • 0

I asked this question about a year ago on another site but never got the answers I was looking for. And I’ve been wondering about it ever since.

I’d like to impliment some search functions similar to Google’s (inurl:foo, site:bar.com)

So if you entered a normal query, with none of these functions included, it would search one column.

However if you included a function (func:foo bar) it would search column 1 for foo and column 2 for bar.

What’s a good solution for this in PHP and MySQL. Also, multiple functions (func1:foo func2:bar query) would be good too.

  • 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-05-13T07:32:10+00:00Added an answer on May 13, 2026 at 7:32 am

    I dont think there is a direct way to do that, but you can write a script.
    Your script first parse the search query and find special occurences, something like this:

    preg_match_all("/([\w_]+):([\w_]+)/", $search_query);
    

    Then you have special requests for your search, say your user asked for user:marvin tag:php comment:preg. Then you know with above regular expression that your user wants to see the comments or marvin tagged as php and includes the term preg and you can build your sql statement accordingly.

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

Sidebar

Related Questions

(I asked this question in another way , and got some interesting responses but
I asked a similar question about this previously, but I did not specify that
In this question, I asked about breaking a dataset into subsets, and got a
I asked this question a while back but now I'm looking to implement an
I asked this question yesterday got a pretty good answer but can't figure out
I saw this question asked about C# I would like an answer for PHP.
In this question , I asked about using queue's and threads in C#. I
I asked a question about this method: // Save an object out to the
I asked this question about how to debug server side applications and I think
I just asked this question about using a regular expression to allow numbers between

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.