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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:02:18+00:00 2026-05-20T14:02:18+00:00

I want store some article into database. I use php and mysql. Whether have

  • 0

I want store some article into database. I use php and mysql.
Whether have a database classification retrieval table?
like:

directory | keyword1 | keyword2 | keyword3 | keyword4|
  sport   | football |    f1    |    nba   |  tennis |

so that:

$query = mysql_query("SELECT * FROM keywordtable WHERE keyword1='$word' OR keyword2='$word' OR keyword3='$word' OR keyword4='$word' ");

if some words in the article match one of the keywords, the article will insert into directory – sport.
Thanks.

I need a table like my example, it should be have many words which can let me reference: if my article appears these words, I can put it into the directory it should in. I know there have more and more words which can be defined into sport.

  • 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-20T14:02:19+00:00Added an answer on May 20, 2026 at 2:02 pm

    If I understand what you’re asking, you’d like to have a keyword table against which you can check content. If the content matches any of the keywords, then the content is tagged with the associated directory. If that’s correct then you need 4 tables:

    keywords

    • kword
    • dir_id, int not null FK directories

    directories

    • dir_id, int not null primary key
    • dir_name, varchar

    article_directories

    • art_id, int not null FK articles
    • dir_id, int not null FK directories

    articles, MyISAM

    • art_id, int not null primary key
    • art_title, varchar
    • content, text FULLTEXT index

      INSERT INTO article_directories(art_id,dir_id)
      SELECT DISTINCT a.art_id, k.dir_id
      FROM articles a, keywords k
      WHERE MATCH (a.content) AGAINST (k.kword)

    The above query will identify all possible directories that an article could belong to. This means that an article could belong to both ‘sports’ and ‘entertainment’, for example.

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

Sidebar

Related Questions

I want to use Context.Items to store some info of a User Control like:
I have some HTML stored in a database that I want to insert into
I want to store some value from SQLite database in my buffer, but the
I want to use session object in my web app.I want to store some
I store some data in MySQL and want to filter out rows that match
I have this code: I want to store some vales in a day of
I am attempting to store files in a MySql database based upon this article
I have lots of article store in MS SQL server 2005 database in a
Suppose I have some text files (f1.txt, f2.txt, ...) that looks something like @article
I want to store some data during my site viewing. Sometime i need 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.