www.webdeveloper.com
Results 1 to 3 of 3

Thread: Updating specific values in a column

  1. #1
    Join Date
    Jul 2011
    Posts
    5

    Updating specific values in a column

    Hi guys,

    I have a content management system that allows me to add/edit/delete entries in our site's database. I'm trying to update a column in a table that has different values. One of the values is "Unknown." and I'm trying to replace all instances with "Not available." Here's the code:
    Code:
    Code:
    UPDATE axes
    SET req = "Not available."
    WHERE req = "Unknown.";
    Simple, right? It does work - the changes show up when I view the entries in the DB; however, when I go visit one of the entries to see if the changes were made, I still see "Unknown." in the req field. In other words, the site does not display the change.

    Any idea why this is happening? I do not want to manually go through each entry with the unknown value, as there are over 1000 such entries.

    Thanks much!

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,338
    What DBMS are you using? Does it require a COMMIT in order to, well, commit transactions?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Jul 2011
    Posts
    5
    Quote Originally Posted by NogDog View Post
    What DBMS are you using? Does it require a COMMIT in order to, well, commit transactions?
    MySQL 5.1, and autocommit is enabled. I even cleared by browser cache, as well as used different browsers.

    Someone suggested I clear the query cache, but that didn't work either.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles