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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:40:12+00:00 2026-06-06T00:40:12+00:00

I currently have a very simple MySQL database (articlesDB) with 1 table (articles) and

  • 0

I currently have a very simple MySQL database (articlesDB) with 1 table (articles) and 6 rows that is set up thus:

 -------------------------------------------------------------------------------------
id (int) | articletitle | articleorganization | articledate | articleurl |  articletags
 -------------------------------------------------------------------------------------

The purpose of the database is to store information about articles as well as to store ‘tags’ that have been applied to those articles so that the articles are searchable by any combination of queries via a form.

The id auto-increments but the article title, organization, date, url, and tags are all input from an entry form built with PHP. The problem is that there needs to be a way to enforce the correct tag spelling is applied to the articles, so I was thinking that check boxes would be the way to go. That way only the correctly (and consistently) spelled tags could be applied.

I’ve found, however, that in order to implement the checkboxes in this manner, I would actually need multiple tables within the database; one for the article data, one for the tags, and one to cross reference the tags with the article data:

// article information

 ----------------------------------------------------------------------
id | articletitle | articleorganization | articledate | articleurl
 ----------------------------------------------------------------------

// tag information

 --------------
id  | articletag
 --------------

// article and tag reference

 -------------------------------
id  |  articleid  |  articletagid
 -------------------------------

After this, though, I’m unsure how to proceed as far as building the logic for the MySQL queries.

I would need to insert data into 3 separate tables, I think, but I’ve got no idea what exactly needs to go where.

Any help or clues as to where to look are much appreciated.

  • 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-06T00:40:12+00:00Added an answer on June 6, 2026 at 12:40 am

    The simplest way would be to have the user type the tags and post the form. In the form treatment file have a SELECT query search for all tags in the Tags table. If they do not match show an error message otherwise create the new entry in the articles table and finally add however many TagOnArticle (or whatever you call it) entry you need.

    Here is how I would model this situation:

    Database relations

    Now if you want to retrieve all valid tags just use:

    SELECT tag_name FROM Tag
    

    And compare the results to what the user has entered.

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

Sidebar

Related Questions

I have a mysql database that is currently running very slow. There are a
I have a very simple interface which needs to communicate between processes. It's currently
I have a very simple table structure here. Just a list of words related
I have a very simple SQL query that I made which retrieves some user
I currently have this schema: CREATE TABLE `users` ( `users_id` int(11) NOT NULL AUTO_INCREMENT,
I currently have a very simple class: public class Music { private Sequence sequence;
I am currently using tomcat 6 as my Web Server. I have a very
im currently learning python (in the very begining), so I still have some doubts
I currently have a query that looks like this: SELECT NON EMPTY ([Measures].[TOTAL]) ON
I currently have links w/ class=ajax that I want to retrieve the element with

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.