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

How to retrieve the current entry_id via DB class or any other method within PHP

Development and Programming

umbrellatech's avatar
umbrellatech
3 posts
8 years ago
umbrellatech's avatar umbrellatech

Hi,

Can anyone help me figure out how do I get the current entry_id via php?

I’m trying to update an entry while viewing it, (so the update will take place before viewing it, i’ll be using the channel api to update the entry but need the entry id,

is there an easier way to get it somehow ?

thank you

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
8 years ago
Ingmar Greil's avatar Ingmar Greil

The Channel Entries API doesn’t do the trick?

       
umbrellatech's avatar
umbrellatech
3 posts
8 years ago
umbrellatech's avatar umbrellatech

The Channel API requires an entry id for all methods, can you post an example of how would i go about updating the current entry?

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
8 years ago
Ingmar Greil's avatar Ingmar Greil

Take a look at the Template Class, then.

       

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.