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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:04:01+00:00 2026-05-12T22:04:01+00:00

Currently, I have an ‘add your ad here’ page, with a form. Now, the

  • 0

Currently, I have an ‘add your ad here’ page, with a form.

Now, the user must select what category he will want to post an ad into…

So I have a table for each category in mysql.

Now my question, how would I make each ad unique, with an ID nr?
If I have several tables, the ‘auto increment’ might turn out to be the same in some ads, am I right?
How is this usually solved?
Assigning a random nr to each ad with javascript?

Remember this: I also have a ‘picture upload’ file input where I must set the picture name the same as the ad id…

Thanks

UPDATE:
If I put all ads in one table, wont this slow down the search of the database? Isnt there any other way to do this?

  • 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-12T22:04:01+00:00Added an answer on May 12, 2026 at 10:04 pm

    This is a problem of normalization. Ad’s are a distinct class of object, and all the ads should be in the SAME table. Likewise categories should be in the same table, and then you should put a category id in your ad record, assuming you need to bring in category data.

    Edit: Nah, shouldn’t be an issue. I’ve seen newspaper ad systems run on that model that have millions of ads (they usually store by ad, and then by individual “run date” so 1 ad record could have a hundred run date records), and don’t take significant time to query. Just figure out how you’re going to be accessing the ads (by date, by category, etc) and set up your indexes accordingly, and you should be fine.

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

Sidebar

Related Questions

I currently have a form that on a coming soon page on my web
I currently have 4 tables. Product, Category, SubCategory, ProductSubCategory. Category has a OneToMany SubCategory
I currently have a form with inputs and name attributes. I'm able to get
I currently have a simple app in the market, now I tried installing it
Currently have a custom Form Element View: class Apply_View_Helper_JQueryUiFormRadio extends Zend_View_Helper_FormElement My form is
Currently have a DataTable, but wish to stream it to the user via a
Currently have a form with a ListView. Users of role A get an image
I currently have the following that will search a field within my db for
Currently I have UNION's between 3 different select statements giving me three rows. What
I currently have a form which takes a date in the format m/d/y -

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.