Welcome to Dream.In.Code
Become an Expert!

Join 150,080 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,791 people online right now. Registration is fast and FREE... Join Now!




Last Row

 
Reply to this topicStart new topic

Last Row

fyrestorm
23 Sep, 2002 - 06:20 AM
Post #1

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
is there a simple way to return the id of the last row that i just entered data in?

i'm using mysql...
User is offlineProfile CardPM
+Quote Post

fyrestorm
RE: Last Row
23 Sep, 2002 - 06:27 AM
Post #2

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
nevermind, i think i found the solution to my problem

mysql_insert_id()
User is offlineProfile CardPM
+Quote Post

Quik
RE: Last Row
23 Sep, 2002 - 06:27 AM
Post #3

D.I.C Lover
Group Icon

Joined: 6 Mar, 2001
Posts: 3,750



Thanked: 1 times
My Contributions
select * from tablename where id = last_insert_id
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 11:30PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month