HI
i want to know how i can get last user id from my database ?
phoenix254 0 Junior Poster
Recommended Answers
Jump to PostTHis depends entirely on what you mean by last user_id. Do you mean the one with the largest value or the one that was inserted last?
Usually these will be the same thing if we're talking about user_id as being the Primary Key which is autoincremented.
So you have a …
Jump to PostCouple of things.
You're not using "last insert id" - this has a different use to the SQL you're using. Make sure you're using the right approach. Only you will know this.
If you're using the SQL method, then you do not need a 'while loop' as you're only retrieving …
All 6 Replies

diafol
phoenix254 0 Junior Poster
phoenix254 0 Junior Poster
jkon 672 Posting Whiz in Training Featured Poster

diafol
phoenix254 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.