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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:18:18+00:00 2026-05-24T02:18:18+00:00

In my app, I allow people to create additional rooms for inventory purposes. Let’s

  • 0

In my app, I allow people to create additional rooms for inventory purposes. Let’s say I have a table called “user_data.” The d_key field is the data type for a lack of a better description. I have that just in case I introduce more custom fields for the user. Anyways, I want every user to have a room that’s called None. This way any item that doesn’t have a room assigned to it will default to “None.”

What’s the best way to introduce None into the table? Users won’t be able to delete this default room, but they can edit/delete rooms they input into the DB table.

user_data table

+---------+-------------+------+-----+---------+----------------+
| Field   | Type        | Null | Key | Default | Extra          |
+---------+-------------+------+-----+---------+----------------+
| id      | int(11)     | NO   | PRI | NULL    | auto_increment |
| user_id | int(11)     | NO   |     | NULL    |                |
| d_key   | varchar(20) | NO   |     | NULL    |                |
| d_value | varchar(40) | NO   |     | NULL    |                |
+---------+-------------+------+-----+---------+----------------+

Sample data:

+----+---------+----------+--------------+
| id | user_id | d_key    | d_value      |
+----+---------+----------+--------------+
| 20 |       2 | location | bedroom      |
| 21 |       2 | location | living room  |
| 22 |       2 | location | attic        |
| 23 |       3 | location | kitchen      |
+----+---------+----------+--------------+
  • 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-24T02:18:19+00:00Added an answer on May 24, 2026 at 2:18 am

    Add the row as part of your user creation process.

    For existing users, loop over the users and ensure they have a “none” room; if they don’t, insert one.

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

Sidebar

Related Questions

I have a small app with iAds, and allow people to pay to upgrade.
The usual case. I have a simple app that will allow people to upload
I am currently working on a simple Silverlight app that will allow people to
My app will allow users to create a personalised list of events from a
I have a simple app that will allow a user to tag a location.
I am doing small Silverlight app which will allow users to Create orders. I
I have a very simple webforms app that will allow field techs to order
I'm building a very simple voiceXML app to allow people to make recordings. But
I currently have an iOS app that allows people to submit content to our
I'm creating an interactive app allowing people to customise doors. To allow them 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.