Recent Topics

1 Jul 27, 2007 01:14    

My b2evolution Version: 1.10.x

I asked this way back in July 2005 and was given this code:

UPDATE `evo_posts` SET `post_comments` = 'closed' WHERE `post_issue_date` < "2003-05-15 17:31:35">

This worked fine at the time but no longer works. I'm assuming because the table(?) names or something has changed. I tried to figure it out on my own how to make it work for the new version but I can't. Can someone guide me on how to make this work for the newest version??

2 Jul 27, 2007 02:23

For detailed information see ../nlogs/install/_functions_evoupgrade.php. Yhere you can see all the changes to the database in the various new versions of B2evo.
To be of any help to you I found:

CHANGE post_comments post_comment_status ENUM('disabled', 'open', 'closed') NOT NULL DEFAULT 'open'" );


so you need to change "post_comments" to "post_comment_status" and hope your new code works.

Good luck

3 Jul 30, 2007 20:34

No workie


SQL query:

UPDATE `evo_posts` SET `post_comment_status` = 'closed' WHERE `post_issue_date` < "2007-07-15 17:31:35" >

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 

4 Jul 30, 2007 20:52

Is the error different from the earlier error?
What does the > do in your query?

5 Jul 31, 2007 21:32

I don't know how much about SQL except how to plug in what I am told :D

That's the date for the posts to be closed prior to, so anything posted before 2007-07-15 should be closed.

6 Aug 01, 2007 13:06

I searched for the post from 2005 you mentioned, but I couldn't find it.
Can you tell me where you put this code? File and linenumber / line after which this line comes.

7 Aug 01, 2007 13:25

Remove the > from your query

UPDATE `evo_posts` SET `post_comment_status` = 'closed' WHERE `post_issue_date` < "2007-07-15 17:31:35"

¥

8 Aug 01, 2007 14:04

¥åßßå wrote:

Remove the > from your query

That was my next answer going to be, but I thought let's wait a day and two responses from Daethian2. :roll:

9 Aug 03, 2007 03:30

Afwas wrote:

I searched for the post from 2005 you mentioned, but I couldn't find it.
Can you tell me where you put this code? File and linenumber / line after which this line comes.

I didn't put it in the code. I go into MyPhPAdmin, click on the proper b2 database, open a query window, paste and hit 'go'.

My prior post was closed but I can find it if you still want it?

10 Aug 03, 2007 03:31

¥åßßå wrote:

Remove the > from your query

UPDATE `evo_posts` SET `post_comment_status` = 'closed' WHERE `post_issue_date` < "2007-07-15 17:31:35"

¥

I have just enough info to be dangerous :oops:
Removed the end one as you showed above (copied it actually) and go this:

Error

SQL query:

UPDATE `evo_posts` SET `post_comment_status` = 'closed' WHERE `post_issue_date` < "2007-07-15 17:31:35"

MySQL said: Documentation
#1054 - Unknown column 'post_issue_date' in 'where clause' 

11 Aug 03, 2007 12:04

"Daethian2" wrote:

Afwas wrote:

I didn't put it in the code. I go into MyPhPAdmin, click on the proper b2 database, open a query window, paste and hit 'go'.

I get it, it was for testing purposes, then I'd want to know what to do with the code.

Error

SQL query:

UPDATE `evo_posts` SET `post_comment_status` = 'closed' WHERE `post_issue_date` < "2007-07-15 17:31:35"

MySQL said: Documentation
#1054 - Unknown column 'post_issue_date' in 'where clause'


OK I found this in _../install/_functions_evoupgrade.php:

CHANGE COLUMN post_issue_date	post_datestart datetime NOT NULL,


So they changed post_issue_date to post_datestart and your SQL query now becomes:

UPDATE `evo_posts` SET `post_comment_status` = 'closed' WHERE `post_datestart` < "2007-07-15 17:31:35"

Good luck

12 Aug 07, 2007 00:02

It worked!!! WOOT!!! Thanks so much!!! This helps me control spam on old posts :D Which would be a handy built in feature if anyone cares what I think LOL

Now can you tell me the difference in my two installs, why one database is b21 and the other is bvlt? Was it somewhere in upgrading that one of the changed?

13 Aug 07, 2007 00:25

Well done. I am glad for you it worked. I actually liked the question :lol:
Above that this may come handy for other users as well.

I don't get you new question:

Now can you tell me the difference in my two installs, why one database is b21 and the other is bvlt? Was it somewhere in upgrading that one of the changed?

Can you be a little more specific on what's b21 and bvlt?

Happy blogging.


Form is loading...