I tried setting the "Show if the following PHP code returns TRUE (PHP-mode, experts only)." of the "Modr8 moderator's block" to:

(db_result(db_query(db_rewrite_sql('SELECT COUNT(*) FROM {node} n WHERE n.moderate = 1'))) > 0)

However, the block is still showing when it shows there are "0 posts in moderation". What am I doing wrong?

Comments

RichieB’s picture

Status: Active » Fixed

My bad. I forgot the php block. The working code is:

<?php return db_result(db_query('SELECT COUNT(*) FROM node n WHERE n.moderate = 1')) > 0 ?>

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.