We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

SQL query help for entries by author

Development and Programming

stevo_s's avatar
stevo_s
176 posts
14 years ago
stevo_s's avatar stevo_s

I have this EE code working which shows the latest 3 entries from a channel. Can you help in suggesting how I might get this to show each new entry by a separate author rather than any author? Thought this might have been done before as on the surface it sounds not too complicated but I can’t find any examples anywhere.

Do I need to re-write the whole code as an SQL Query? or would something else work? Could I repeat the EE code 3 times and use some kind of offset or if statement of author id? Would I need to do something like DISTINCT in an SQL query? I’ve tried a few SQL queries but it just doesn’t seem to be working as I’m not an expert with them (as yet) Any help greatly appreciated.

<h3>Latest Entries<h3>
{exp:channel:entries channel="portfolios" orderby="date"  ASC limit="3" group_id="5" dynamic="no"}
{entry_date format="%j %M %Y"}

<a href="http://{path=portfolios/gallery/{username}}">{exp:ce_img:single src="{thumbnail}" height="112" width="150" crop="yes"} </a>

{/exp:channel:entries}
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.