SQL error
-
Hi there,
My blog has been working fine for months without any real problems, but today I noticed that an SQL query that retrieves the posts is returning an error all of a sudden, which is in turn causing the main foreach loop that takes the posts as an argument, to return an error also.
With my limited knowledge of SQL I can’t see quite what the matter is with the query, but here’s the output:
<div id='error'>
SQL/DB Error:
[<span style='color: #007;'>Got error -1 from table handler</span>]
SELECT DISTINCT * FROM wpmain_posts WHERE 1=1 AND post_date > '2004-05-11 00:00:00' AND post_date <= '2004-05-23 13:15:44' AND (post_status = "publish") GROUP BY wpmain_posts.ID ORDER BY post_date DESC
</div>
And here’s the other error from the foreach loop:
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/nocturn/public_html/blogb.php</b> on line <b>2</b>
If anybody can clue me in on what’s causing that SQL query to fail all of a sudden, then that would be very useful. Thanks ??
- The topic ‘SQL error’ is closed to new replies.