Disabled accounts - Viewers causes SQL error!

2 posts by 2 authors in: Forums > CMS Builder
Last Post: March 5, 2013   (RSS)

By mdegive - March 5, 2013

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.

By gregThomas - March 5, 2013

Hi,

I've done some local testing, but couldn't recreate the problem. Would it be possible to complete a second level support request for me? You can find the form here:

https://www.interactivetools.com/support/email_support_form.php

Then I can take a closer look at what is causing the issue.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com