Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-30-2007, 01:14 AM   PM User | #1
PaulC2K
Regular Coder

 
Join Date: Jul 2005
Posts: 110
Thanks: 13
Thanked 0 Times in 0 Posts
PaulC2K is an unknown quantity at this point
MySQL - retreiving last 'row' added - n/m solved

Hi,

I've had this before, gone through post history and a few sites ive built where i might have used this and cant find it.

Say ive just added a new peice of information to my table, i know theres a simple way of requesting that peice of info so i can get its auto-incremental ID number given to that row. That way i can then take that ID and pass it onto another table without having to search for the information i've just submitted.

Thx,
PaulC2K

Last edited by PaulC2K; 05-30-2007 at 01:21 AM..
PaulC2K is offline   Reply With Quote
Old 05-30-2007, 01:19 AM   PM User | #2
PaulC2K
Regular Coder

 
Join Date: Jul 2005
Posts: 110
Thanks: 13
Thanked 0 Times in 0 Posts
PaulC2K is an unknown quantity at this point
nevermind, what a n00b, couple of minutes later and i spot what im looking for on the previous from where i was looking!

mysql_insert_id();

PaulC2K is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:36 PM.


Advertisement
Log in to turn off these ads.