• I am looking for a mysql query that will let me edit the same field in multiple rows at once. Specifically, I would like to edit the category field for each post id in my database. Can someone help?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I can’t help you with a mysql query but I can tell you another way to do it.
    If you use macromedia dreamweaver (don’t know if you do) and download that sql database, you can open it up and by pressing control + F it’ll bring up the find/replace screen. There you can change it in two seconds. (ex enter “news” in the find section, and enter “information” in the replace section. Click replace all and you’re done).
    Maybe there is another way

    I use phpmyadmin and would run something like this:
    UPDATE tablename
    SET fieldname =
    REPLACE(fieldname
    ,’text-to-search-for’
    ,’replacement-text’
    );

    Thread Starter joshuaclinard

    (@joshuaclinard)

    Thanks for the suggestions, but a find and replace option will not work. I don’t want to change every post’s category. I only need to change about half of them.

    Can you even describe programmatically which ones? Is it ‘category X is switching to Y’? Or is there a bunch of specific post ID’s?
    -d

    Thread Starter joshuaclinard

    (@joshuaclinard)

    They are all category 1 right now. Some need to be changed to category 2.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘MySQL Query Help’ is closed to new replies.