0

I am setting up a search by author section on the blog for my website. I have all the code set up correct, and people are showing up! However, not everyone is showing up. When I run the SQL Query below, I am short a couple of results. When I move a member from Group 6 to Group 1, she shows up.

Am I missing something here?

<h1 style="font-size:24px;font-weight:normal;color:#72736F;border-bottom: 1px dotted #999;">Search by Author</h1>

{exp:query sql="SELECT* 
  FROM exp_members 
  WHERE group_id = '1' OR group_id = '6'
  AND total_entries != 0
  AND in_authorlist = 'y'
"}
  <a href="{site_url}wcrealtors_blogs/author/{member_id}" class="blogimg">
    <img src="{site_url}/images/avatars/{avatar_filename}" class="imgblogauthorbar"/>
  </a>
{/exp:query}

Thank you in advance for your help!

0

There should be a space between your select statement and your all field list term:

SELECT *

but past that, this is definitely a correctly structured query. When you visit the

CP Home -> Members -> Member Groups -> Edit Member Group

page of your Super Admin group, are Super Admins set to yes for this option?

Include Members in PUBLISH page multi-author list?
| improve this answer | |
  • I added the space, and nothing changed. However, the author was not listed in the PUBLISH page multi-author list! Worked like a charm! Thank you, thank you! – Kent Prickett Jun 30 '15 at 17:32
  • I hope my answer pointed you in the right direction, and glad you got it down! – jrothafer Jun 30 '15 at 17:40
  • It sure did! Thank you so much. Exactly what I needed!! – Kent Prickett Jun 30 '15 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.