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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:24:06+00:00 2026-06-14T02:24:06+00:00

We get this daily data feed. (We have no control over the original data,

  • 0

We get this daily data feed. (We have no control over the original data, so asking them to correct the database isn’t an option.)

The customer records contain addresses in the US. Street address, City, State and Zip.

On our end, we use the data in a database for the marketing department. They sometimes find the address is incorrect, or incomplete, and want to make changes to it. But of course, the next data feed would come in and wipe out their corrections.

Is there a method inf MySQL to protect certain fields from being changes, kind of like a protected cell in a spreadsheet. This is some of the field names of the MySQL record layout:

address1
address2
address3
city
state
zipcode

What if I created along side of this, additional fields that are flagged either “Y” or “N” as being a protected field:

address1
address1_flag
address2
address2_flag
address3
address3_flag
city
city_flag
state
state_flag
zipcode
zipcode_flag

So when the marketing department corrects, for example, the zipcode, it would set the zipcode_flag to “Y” meaning, Yes protect the field zipcode from further changes. If the original data feed does get corrected at a later point, then if zipcode from the marketing department’s database matches the original field, then the zipcode_flag protection would be changed to “N”.

Does this sound like the correct method to manage the marketing department’s database from the daily feed? Or is there another approach or feature available in MySQL to do this? Thanks!

  • 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-14T02:24:08+00:00Added an answer on June 14, 2026 at 2:24 am

    I don’t think there’s a “protected” flag or feature, but there are a few roads you could take to accomplish your goal.

    The first and most specific would be to create a “restricted user” in MySQL. To restrict the user, you can/would grant only SELECT privileges to the column(s) you don’t want modified. To do this you would use:

    GRANT SELECT(zipcode) ON addresses TO restrictedUser;
    

    You can see a good example of this here, or get detailed information in the manual.

    A second method would be to create a procedure that selects/inserts/updates. This one may be overkill, but could be accomplished to suit your needs and won’t require modifying user permissions.

    A simple example of a select and update procedure would be (not tested):

    CREATE PROCEDURE select_addresses ()
    BEGIN 
       SELECT address1, zipcode FROM addresses;
    END 
    
    CREATE PROCEDURE update_addresses ( IN recordID INT(11), IN newAddress1 VARCHAR(255) )
    BEGIN
        SET @query := CONCAT("UPDATE addresses SET address1 = '", newAddress1, "' WHERE id = ", recordId);
        PREPARE stmt FROM @query;
        EXECUTE stmt;
    END
    

    This will allow a user to select any column you specify that they’re allowed to read by calling select_addresses() and then perform an update on any allowed column via update_addresses(). You’d have to add several layers of logic to only update variables that have been set, etc – so using a procedure may in fact be overkill =P

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

Sidebar

Related Questions

Cant get this script to work with my menu really have tried everything any
I get this error when I run the code below. I have normally used
i get this error Cannot open database DataLayer.Context.MedicallexiconContext requested by the login. The login
I have a script that will run on server daily to download data from
I have a html select syntax like : <select id=salary_structure_salary_structure_line_items_attributes_0_payhead_id class=half name=salary_structure[salary_structure_line_items_attributes][0][payhead_id]> <option data-payhead=Earnings
I have several laptops in the field that need to daily get information from
I have a zoo object in R that has daily data and is missing
This is my jQuery... $.ajax({ type: 'POST', url: 'http://adamscarter.co.uk/daily/facebook/savefbprofile.php', data: {'fb_id': fb_id, 'fbusername': fbusername,
I get an variable via ajax from php file This is data for google
I have daily stock data as an HDF5 file created using PyTables. I would

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.