Frank Vèssia Posted December 6, 2012 Posted December 6, 2012 Hello, how can I get the latest comment ID after his creation? $commentPage->comment->add($c); if ($commentPage->save('comment')){ // get comment id }
diogo Posted December 7, 2012 Posted December 7, 2012 ok I didn't test it and wasn't sure... you look different suddenly... 1
ryan Posted December 7, 2012 Posted December 7, 2012 Got it, it's first() not last() I think this depends what sorting is used on the comments.
diegonella Posted January 5, 2013 Posted January 5, 2013 and... $commentPage->comment->add($c); if ($commentPage->save('comment')){ echo $commentPage->id; }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now