When I turn on Disabled Accounts Viewers: Hide records that are "Created By" a user who is: deleted, disabled, or expired on one my my sections I get the following SQL error:
MySQL Error: 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 ') ORDER BY dragSortOrder DESC LIMIT 1' at line 3
Here is the debugSql:
SELECT SQL_CALC_FOUND_ROWS `newsletters`.* FROM `cms_newsletters` as `newsletters` WHERE (num=4828 AND newsletters.createdByUserNum IN (SELECT num FROM `cms_accounts` WHERE disabled != 1 AND (expiresDate > NOW() OR neverExpires = 1))) ORDER BY pub_date DESC, title LIMIT 1
And here is the code:
list($newsletterRecords, $newsletterMetaData) = getRecords(array(
'tableName' => 'newsletters',
'where' => 'num='.$num,
'allowSearch' => false,
'limit' => '1',
'debugSql'=> true,
));
I have version 2.5 installed.