Mike Miller Posted July 9, 2011 Share Posted July 9, 2011 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: 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! Quote Link to comment https://forums.phpfreaks.com/topic/241519-updating-specific-values-in-a-column/ Share on other sites More sharing options...
QuickOldCar Posted July 10, 2011 Share Posted July 10, 2011 You say they change in the database so the query works. Most likely is just your browser cache, page cache, or query cache. Restart the server and clear your browser cache too. Quote Link to comment https://forums.phpfreaks.com/topic/241519-updating-specific-values-in-a-column/#findComment-1240720 Share on other sites More sharing options...
Mike Miller Posted July 10, 2011 Author Share Posted July 10, 2011 You say they change in the database so the query works. Most likely is just your browser cache, page cache, or query cache. Restart the server and clear your browser cache too. Thanks for the response. Yeah, I restarted the web servers, cleared my cache, and tried different browsers. I still see "Unknown." in the req field. Any other suggestions? Is there a way to force the update? Quote Link to comment https://forums.phpfreaks.com/topic/241519-updating-specific-values-in-a-column/#findComment-1240950 Share on other sites More sharing options...
QuickOldCar Posted July 10, 2011 Share Posted July 10, 2011 Do you use page caching? Quote Link to comment https://forums.phpfreaks.com/topic/241519-updating-specific-values-in-a-column/#findComment-1240953 Share on other sites More sharing options...
Mike Miller Posted July 11, 2011 Author Share Posted July 11, 2011 Do you use page caching? Yes, I do. Quote Link to comment https://forums.phpfreaks.com/topic/241519-updating-specific-values-in-a-column/#findComment-1241468 Share on other sites More sharing options...
QuickOldCar Posted July 11, 2011 Share Posted July 11, 2011 I don't know what system you use, possible your own just saving pages into a folder related to urls. Depending on what your cached server pages expire times are set to, they should really overwrite in a short time anyway. If just want them gone now, Delete the cached pages. Quote Link to comment https://forums.phpfreaks.com/topic/241519-updating-specific-values-in-a-column/#findComment-1241475 Share on other sites More sharing options...
fenway Posted July 14, 2011 Share Posted July 14, 2011 I don't believe that you actually updated them. Quote Link to comment https://forums.phpfreaks.com/topic/241519-updating-specific-values-in-a-column/#findComment-1242497 Share on other sites More sharing options...
Mike Miller Posted July 20, 2011 Author Share Posted July 20, 2011 I don't believe that you actually updated them. Can you clarify? Quote Link to comment https://forums.phpfreaks.com/topic/241519-updating-specific-values-in-a-column/#findComment-1245005 Share on other sites More sharing options...
fenway Posted July 22, 2011 Share Posted July 22, 2011 I mean, did you actually examine the DB to confirm that the rows have been changed? Sounds simple enough, but it happens. Quote Link to comment https://forums.phpfreaks.com/topic/241519-updating-specific-values-in-a-column/#findComment-1246233 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.