How can I change data for one column in a database?

UPDATE . I found that I was calling the permalink from another table with old values. How can I take data from the permalinks table and only change the permalinks column in another table?

New id=7005     permalink=beef-ground-85%25-lean-meat-15%25-fat-raw
Old  id=7005    permalink=beef-ground-85pct-lean-meat-_15pct-fat-raw

      

I've done everything in the title, but old entries keep popping up in local development in my rails app.

List of things I've done.

sudo /etc/init.d/mysql restart
rake tmp:cache:clear
rake tmp:clear
clear all browser cookies / cache / sessions

      

What's happening?

0


source to share


1 answer


In response to your update ... Actually this is not like a comment: this is why foreign key constraints exist. However, the MySQL MyISAM table type (default) does not support them.



A foreign key with an ON UPDATE CASCADE clause would automatically set this for you.

0


source







All Articles