Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
    Regular Coder
    Join Date
    Mar 2010
    Posts
    198
    Thanks
    78
    Thanked 5 Times in 5 Posts
    If you see the changes made in your database but your website is still displaying the old text. Make sure that you have cleared your cache.
    Maney CMS sites cache there queries to speed up the page loading.

  • #3
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by conware View Post
    If you see the changes made in your database but your website is still displaying the old text. Make sure that you have cleared your cache.
    Maney CMS sites cache there queries to speed up the page loading.
    Are you referring to my browser cache? If so, I have cleared that quite a few times. No go.

    I even reset the query cache and that didn't do the trick either. Running MySQL 5.1.

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Possibly the code (PHP?) that retrieves the req value from the DB is interpreting the value. If it is anything other than some particular set of values, perhaps it displays "Not available."

  • #5
    New Coder
    Join Date
    Aug 2011
    Location
    Virginia
    Posts
    10
    Thanks
    2
    Thanked 1 Time in 1 Post
    Did clearing your cache work? I am having a similar issue with a wordpress plugin I am working on.

  • Users who have thanked travin69 for this post:

    fmbcuk (09-17-2011)

  • #6
    New Coder
    Join Date
    Aug 2011
    Location
    Louisville, KY
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When I had a similar problem I did a hard refresh (CTRL+F5) and that worked for me.

  • #7
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    clearing dns cache and computer cache would do the trick sometimes?

  • #8
    New Coder
    Join Date
    Aug 2011
    Location
    New Jersey
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I've also solved this problem using a hard refresh (CTRL = F5). Hopefully it's that simple of a fix

  • #9
    New Coder
    Join Date
    Aug 2011
    Location
    Virginia
    Posts
    10
    Thanks
    2
    Thanked 1 Time in 1 Post
    Thanks Kevin. Good looking out. Still wondering if clearing the cache worked.
    My Work: US Navy
    My Hobby: Best Credit Score

  • #10
    New Coder
    Join Date
    Aug 2011
    Location
    Louisville, KY
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you try the hard reset and clear the cache and it still doesnt work then try this from the command prompt:

    ipconfig /flushdns

  • #11
    New Coder
    Join Date
    Aug 2011
    Posts
    26
    Thanks
    2
    Thanked 1 Time in 1 Post
    What DBMS are you using?
    “Computers are useless. They can only give you answers.”
    (Pablo Picasso) Where To Find Coupons and Video Testimonials

  • #12
    New to the CF scene
    Join Date
    Sep 2011
    Location
    England
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jbh5000 View Post
    If you try the hard reset and clear the cache and it
    still doesnt work then try this from the command prompt:

    ipconfig /flushdns
    Thanks, I tried everything to solve this problem, well almost everything but this did the trick. I haven't been here long but this is a great forum!


  •  

    Posting Permissions

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