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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:00:42+00:00 2026-06-16T23:00:42+00:00

Basically I want to query a database and modify the values of one column

  • 0

Basically I want to query a database and modify the values of one column based on the contents of another.

Here’s my idea of how it would work:

IF Column 'Town'  IS NOT NULL then Column 'Sign-up type' = 1 else = 0

The logic is, i’ve added a new column into the DB that will store whether a quick or full sign up has been made.

Quick = 0, Full = 1. Default is 0 = Quick.

I’ve managed to implement the change on the two registration forms that feed the DB, but I need to append the historical data to backwards fill the data.

Because the quick sign up only collects name, and email, those entries do not contain data in the ‘Town’ field which is a required field in a full sign up.

So i’m using that as a reference point to select all the entries that DO have (NOT NULL?) data in order to enter ‘1’ (representing ‘Full’) into ‘Signup Type’ column.

I hope I’m making sense! I only have a basic understanding of MySQL but I’m willing to learn, it’s sometimes hard trying to explain what I want to do when I’m unclear of the correct jargon!!

  • 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-16T23:00:43+00:00Added an answer on June 16, 2026 at 11:00 pm
    UPDATE yourTable SET signupType = IF(Town IS NULL, 1, 0);
    

    Note this will update all data, you may want to limit this to historical data (by the sounds of things this should be fine however).

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

Sidebar

Related Questions

I want to query a set of tables based on the column name, type,
I am writing a query for my database and basically I want to query
I basically want to do this in code: PersonList myPersonList; //populate myPersonList here, not
I am trying to write a query for my database. Basically, I have an
I have a database from which I want to query and display only that
I'm struggling with a join. Basically I want the tags results from my query
I basically want something like: TextView Button Button . . . TextView TextView SeekBar
I basically want to setup a relationship similar to Netflix's DVD rental model. There
I basically want to do: git checkout branchA git checkout -b branchB <commit_id> which
I basically want the same functionality as facebook, twitter and all those other infinite

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.