Recent Topics

1 Dec 09, 2005 14:10    

Hi

I have only the most basic understanding of SQL but would like to change all of the "post_comments" field properties from "open" to "closed". Is there a simple instruction that I can run which will do this for me?

Any help or advice gratefully received

2 Dec 18, 2005 05:32

I'm a total mysql newbie but maybe you could use a WHERE statement (or whatever they're called) and alter all "post_comments" to "closed" WHERE "post_datedeadline" = NULL....(pick something from your table where all your posts will qualify).

As I said, I have next to no skills with sql and I'm sure there's a very simple way to do what you want. But it seems the way I said would work too, as long as you can figure out the actual syntax to use. :lol:

3 Dec 18, 2005 14:45

Assuming you have phpmyadmin to play with your database and assuming you haven't changed the prefix of the table names this should work:

update `evo_posts` set `post_comments` = 'closed' where `post_ID` > 0

4 Dec 18, 2005 14:56

That's done the trick. I had to alter the final condition to "where `ID` > 0" but that's saved me a lot of time.

Many thanks.

5 Dec 18, 2005 22:29

gavingough wrote:

I had to alter the final condition to "where `ID` > 0"

Oh yeah. I always mess that one up. There are only a couple of table fields that don't use the table name as a prefix. Cool - glad it got you close enough.


Form is loading...