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 8168127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:25:06+00:00 2026-06-06T20:25:06+00:00

I want to search the computer from this table and when i have stored

  • 0

I want to search the computer from this table and when i have stored this in database so now can find the string and pass to the query so it this string present in database then show result

i am doing

  1. i am getting the value form the url my url looks like localhost\demo\article.php?filter=computer

    $_GET['filter']

  2. my database is

    id | name |tag
    
    1  |java  |a:2:{i:0;s:8:"Computer";i:1;s:4:"Code"; 
    
    2  |dbms  |a:2:{i:0;s:8:"Computer";i:1;s:4:"dbms"; 
    
    3  |c     |a:2:{i:0;s:8:"elect";i:1;s:4:"Code"; 
    

now i am want to fetch all the row where the computer is present or code

for that i am using the query

$query1 = "SELECT * FROM $tableName WHERE tag='%".$_GET['filter']."%' ";

but its not showing the row having the computer or code..

its like the stackoverflow tag filtration

  • 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-06T20:25:07+00:00Added an answer on June 6, 2026 at 8:25 pm

    Solving your problem is by replacing = with like so your query should be

    $query1 = "SELECT * FROM $tableName WHERE tag like '%".$_GET['filter']."%' ";
    

    a better way of doing this, is to create extra two tables. One will contain your tags (optional) and the other will contain tagging information.

    enter image description here

    This article will help you so much

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

Sidebar

Related Questions

I want to search in a database table for the number of rows of
I want to search two string in datarows.For example; string1=ex string2=ex2 row1={'ex','ex2','ex3'....}---->True row2={'ex3','ex1','ex2'....}---->True row3={'ex2','ex5','ex6'....}---->False
This question may seem rather basic, but coming from an engineering (non computer-science) background,
I have an old computer with formatted drive lying around collecting dust, now I
I want to compare an image against a database of images to find any
i want to know how can i pass a parameter (Get) to my model
I have MAMP installed on my Mac with OS X 10.6. This computer's name
I want to have two elements stay on the same row. Right now I
I have out put like below and i want to search for a particular
I want to search the program >> that is by which you append to

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.