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

Where is author ID stored?

Development and Programming

Environ-IT's avatar
Environ-IT
26 posts
15 years ago
Environ-IT's avatar Environ-IT

I want to query the exp_channel_data table for entries created by a particular author (actually the currently logged in user). Where is the link between the records in this table and the user_id of the entry’s author?

Thanks

Andrew

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
15 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Hey Andrew

The author ID is stored in the exp_channel_titles table under the column ‘author_id’.

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
15 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team
I want to query the exp_channel_data table for entries created by a particular author (actually the currently logged in user).

Have you considered just using the exp:channel:entries tag pair with the author_id parameter in use? I don’t know if that’s exactly what you need but though I’d point you in that direction just in case.

http://ellislab.com/expressionengine/user-guide/modules/channel/parameters.html#par_author_id

       
lebisol's avatar
lebisol
2,234 posts
15 years ago
lebisol's avatar lebisol

exp_channel_titles and you can relate the tables through entry_id. Also, consider this.

       
Environ-IT's avatar
Environ-IT
26 posts
15 years ago
Environ-IT's avatar Environ-IT

Great thanks for the pointer to the correct table, and yes I would normally just use the exp:channel:entries tags, but in this case I’m writing a query joining custom tables, so it wouldn’t apply.

Thanks again

Andrew

       

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.