On second look it appears $placeholders isn't getting populated, so you should look for what $placeholders SHOULD be.
Error: SELECT DISTINCT( p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN ()
SQL code: SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid IN ($placeholders)
and from the code you showed in a different email $placeholders should be an array of account role ids: $rids = array_keys($account->roles); $placeholders = implode(',', array_fill(0, count($rids), '%d'));
so view the content of your roles table - because apparently there aren't any roles or it's not getting populated for some other reason. If there are roles, try the following SQL in phpMyAdmin SQL execution (there's an SQL tab just click that and paste this in): SELECT DISTINCT(p.perm) FROM `role` r INNER JOIN `permission` p ON p.rid = r.rid WHERE r.rid IN (1,2,3,4)
Note I replaced the {} with `` and replaced $placeholders with a comma separated list of role ids from my installation - I have 4 roles and therefore 4 role ids - you'll have to check your roles table to find out what your list should be. In my case I get 4 results when running that query and they look like this:
access content access comments, post comments, access site-wide c... administer blocks, use PHP for block visibility, e... access brilliant_gallery, access comments, post co...
(text is truncated in phpMyAdmin)
Skip Taylor wrote:
I have no idea how to run the query through the linux shell or any front-end interface (it would be PHPAdmin). Yes, it is MySQL.
I'll see if I can see the end of the logs and see if it's more specific.
Thanks! Skip
On Nov 29, 2007 3:56 PM, <Sarah.Vardy@student.griffith.edu.au mailto:Sarah.Vardy@student.griffith.edu.au> wrote:
have you tried running the query through a linux shell (if you have ssh access) or through a front-end interface for your mysql (if that's what you use)? it will probably be more descriptive as to what your error is. also check your error logs. you can check them through drupal or if you have ssh access you can check them through that with a command like: tail /var/log/httpd/error_log ----- Original Message ----- From: Skip Taylor <avskip@gmail.com <mailto:avskip@gmail.com>> Date: Friday, November 30, 2007 9:49 am Subject: Re: [support] Comment/Settings page error To: support@drupal.org <mailto:support@drupal.org> > The MySQL version is 4.1.22 > > > On Nov 29, 2007 2:20 PM, Earnie Boyd > < earnie@users.sourceforge.net <mailto:earnie@users.sourceforge.net>> wrote: > > > Quoting Skip Taylor <avskip@gmail.com <mailto:avskip@gmail.com>>: > > > > > Running update.php has made no difference so far. Just > tried it again > > and > > > it's the same errors. > > --8<-- > > > > > >> > Location: > http://www.mydomain.com/admin/content/comment/settings> >> > > Message: 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 ')' at line 1 query: SELECT DISTINCT( p.perm) FROM > role r INNER > > >> > JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in > > >> > /includes/database.mysql.inc on line 172. > > >> > > > >> > I've disabled ALL modules, yet the error persists. Not > sure where to > > go > > >> > with this next. Is it a problem with comments , something > wrong in > > the > > >> > database or the user database/module? > > >> > > > >> > Thanks for any ideas! > > >> > > > > > If you've answered this already, forgive me; what version of MySql? > > > > Earnie -- http://for-my-kids.com/ <http://for-my-kids.com/> > > -- http://give-me-an-offer.com/ > > > > -- > > [ Drupal support list | http://lists.drupal.org/ ] > > > > > > -- > Half of being smart is knowing what you're dumb at. -- David Gerrold > --- > NOTICE: This email message is for the sole use of the intended > recipient(s)and may contain confidential and privileged > information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you > are not the > intended recipient, please contact the sender by reply email and > destroy all > copies of the original message. > -- [ Drupal support list | http://lists.drupal.org/ ]-- Half of being smart is knowing what you're dumb at. -- David Gerrold
NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.