Re: SQL error when activate pruning
Hello again, thank you very much for your instructions. Yes, my wordpress site is running very well, the only problem I have until now is this about pruning.
The problem is appearing until the first time I installed wordpress+classipress and I activated pruning. In other words, is present including without any post. I make test with 1 post, 2 posts... to 5 post at the same time. The problem is always present. I have tested with 30 days, 20, days, 1 day, 90 days.... the same result.
Now I don't have any post published.
I have changed the code that you said me, this is the result:
SELECT `ID` FROM wp_posts WHERE `post_date`<'12-02-2009 02:50:37' AND `post_status`='publish' AND `post_type`='post' LIMIT 10<-- sql statement
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/.../
wp-content/themes/classipress/index.php on line 151
The line now is 151 because of the changes you said me, this line 151 is this:
while ($row=mysql_fetch_array($sql)){
Then I changed again the code to match exactly my time format (day-month-year), that is:
date('d-m-Y h:i:s'
And again the same:
SELECT `ID` FROM wp_posts WHERE `post_date`<'02-12-2009 02:46:51' AND `post_status`='publish' AND `post_type`='post' LIMIT 10<-- sql statement
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/.../
wp-content/themes/classipress/index.php on line 151
I hope you will have another idea about what is happening. I don't know if this is useful to you: until I was waiting for support in this forum I was searching in Google for hours to see if I could read any solution of other people with the same problem as I. I did not have luck, but in my search I could see at least 2 webs online using classipress with the same sql error as me. I must say, too, that the hosting I'm using in this site is the same I have to host some other wordpress blogs that are mine, each one of this blogs is using a different database, user, template, plugins, etc. and all of these blogs are running without problem.
Thanks in advance.