Jump to content

Best way to go about this? -update field in mysql database (php/mysql) *solved*


hostfreak

Recommended Posts

Recently I have just discovered that I had a default of 0 set on a mysql field (if nothing was selected on the form for the field, it would then go to 0), when it should have had a default of nothing if nothing was selected on the form. So what would be the best way for me to go about updating it? I need the ones that contain 0 to be changed to where they are blank. There are a lot of rows, otherwise I would just manually edit them from phpmyadmin. I was thinking this could be done via making a page that selected the field where it had a value of 0. Then making a form that doesn't receive a value and then update it that way? I am not 100% sure how to go about that though. The table name that the field is in, is "users". The field is "id2". Thanks in advance for any replies.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.