2 afwas Jul 27, 2007 02:23

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
Is the error different from the earlier error?
What does the > do in your query?
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.
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.
Remove the > from your query
UPDATE `evo_posts` SET `post_comment_status` = 'closed' WHERE `post_issue_date` < "2007-07-15 17:31:35"
¥
¥åßßå 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:
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?
¥åßßå 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'
"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
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?
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.
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:
so you need to change "post_comments" to "post_comment_status" and hope your new code works.
Good luck