PHP Query

Posted on 2015-02-21
Last Modified: 2015-02-21
In PHP how do you grab the last (Or highest) ID number that is auto increment?
Question by:rgranlund
  • 2
LVL 108

Accepted Solution

Ray Paseur earned 500 total points
ID: 40623387
Do you mean MySQL?

If so, it's a query clause... ORDER BY id DESC LIMIT 1

Author Comment

ID: 40623400
Ahh haa!  Thanks.
LVL 108

Expert Comment

by:Ray Paseur
ID: 40623434

Thanks for the points and thanks for using E-E, ~Ray

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
join tables 4 50
form button worked now it doesnt anymore 9 40
test if query has no results 2 19
how to use a function in heredoc 5 21
Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now