Recent Topics

[3.x & 4.x] Error on single post with "Random order

Thread started by , Thu Apr 21, 2011 19:18 – Last touched: Thu Apr 21, 2011 19:18
Started by , 04/21/11

Apr 21, 2011 19:18    

How to reproduce:
1. Blog settings > General > Order by: "Random order"
2. Open any single post page

Exact error message:

Code

MySQL error!
 
Unknown column 'post_RAND' in 'order clause'(Errno=1054)
 
Your query: Get ID of next item
 
SELECT DISTINCT post_ID
  FROM stable_items__item
INNER JOIN stable_postcats ON post_ID = postcat_post_ID
INNER JOIN stable_categories ON postcat_cat_ID = cat_ID
WHERE ( cat_blog_ID = 1 )
   AND (( post_ptyp_ID IS NULL
    OR post_ptyp_ID NOT IN (1000,1500,1520,1530,1570,1600,3000) ))
   AND (post_datestart <= '2011-04-21 10:17')
   AND ( (  ( post_status = 'private'
   AND post_creator_user_ID = 1 )
    OR post_status IN ('published','protected') ) )
ORDER BY post_RAND ASC, post_ID ASC
LIMIT 1

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.