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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:19:00+00:00 2026-05-23T00:19:00+00:00

I’m developing an auctioning website. Each auction has a lot of options, that i

  • 0

I’m developing an auctioning website. Each auction has a lot of options, that i want to be able to filter on the front-end.

I was wondering what is best practice in handling/storing these options (mostly booleans/checkboxes).

  • Is it best practice to store them all in the same row ?
  • Or would it be better to store them all in one “auction_options” table?

I guess the last option is the best one..but how would a query look like to:
select all auctions that have:

  • state ohio
  • state utah
  • some other option

I just can’t get my head around this. Is this even possible ?

EDIT –> the reply to comment field was not enough

I created 3 tables:

  • auction table -> a_id | a_desc | etc
  • a_options table -> a_o_id | a_o_name | a_o_value
  • a_options2auction table -> id | a_id | a_o_id

when i run this query:

SELECT * FROM auctions as A
INNER JOIN a_options2auction as B ON A.a_id = B.a_id
INNER JOIN a_options as C ON B.a_o_id = C.id
WHERE c.value = ‘groningen’ OR c.value = ‘utrecht’

it returns 2 rows that are both the same auction, that should not be possible 🙂

  • 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-23T00:19:01+00:00Added an answer on May 23, 2026 at 12:19 am

    You can use an options table that is connected M-N to the auctions table.

    Between these two tables you should build another table to connect them.

    Auctions 
        |
    Auctions_options
        |
    Options
    

    So a query would be like this

    SELECT * FROM Auctions as A 
    INNER JOIN Auctions_Options as B ON A.id_auction = B.id_auction 
    INNER JOIN Options as C ON B.id_Option = C.id_Option 
    WHERE C.Option_name = 'State' AND (B.value = 'ohio' OR B.value='utah' OR B.value = '...')
    

    This solutions allow you to add infinites options to an auction and store their value (each auction can have different options from the others too)

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

Sidebar

Related Questions

Developing a site that requires monthly subscriptions via PayPal. If a buyer has an
Developing an application for Android, i want to record data that will be usefull
Developing rails has become lots of fun over the year that I've done it,
Iam developing one application.In that iam placing the radio buttons(uiimageview) on table view and
iam developing one application.In that i need to get the music files from the
Developing with my first Mac and I noticed that my Rspec output isn't colorized
Developing a network application, I have a Connection class that manages sending and receiving
Developing a series of POCOs on my project, and just realized that some of
Developing a new ROR3 website, I need to implement a sort of internal mail
Developing for iPhone, I have a collection of points that I need to make

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.