Re: [PHP-DB] How to find the last ID?

2003-06-06 Thread Jeff Shapiro

$last_id = mysql_insert_id();

Check out this page for details.
http://www.php.net/manual/en/function.mysql-insert-id.php

On Fri, 6 Jun 2003 17:16:01 -0400, Chris Payne wrote:
> Hi there everyone,
> 
> I'm creating a new entry using the following:
> 
> mysql_query ("INSERT INTO agents (agent_name) 
>VALUES ('$agentname')
> 
> but I need to find out the ID value it created, how can I do this easily?
> 
> Thanks
> 
> Chris

---
Listserv only address.
Jeff Shapiro

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] How to find the last ID?

2003-06-06 Thread Chris Payne
Hi there,

Thanks for your quick reply, very appreciated :-)

Chris

> hi
> 
> you can easily do this by using
> 
> mysql_insert_id();
> 
> see
> http://www.php.net/manual/en/function.mysql-insert-id.php
> 
> .ma
> 
> e: [EMAIL PROTECTED]
> w: http://www.abendstille.at
> /***/
> life would be easier if i knew the source code.
> 
> Am Freitag, 06.06.03 um 23:16 Uhr schrieb Chris Payne:
> 
> > Hi there everyone,
> >
> > I'm creating a new entry using the following:
> >
> > mysql_query ("INSERT INTO agents (agent_name)
> >VALUES ('$agentname')
> >
> > but I need to find out the ID value it created, how can I do this 
> > easily?
> >
> > Thanks
> >
> > Chris
> 
> 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] How to find the last ID?

2003-06-06 Thread . ma
hi

you can easily do this by using

mysql_insert_id();

see
http://www.php.net/manual/en/function.mysql-insert-id.php
.ma

e: [EMAIL PROTECTED]
w: http://www.abendstille.at
/***/
life would be easier if i knew the source code.
Am Freitag, 06.06.03 um 23:16 Uhr schrieb Chris Payne:

Hi there everyone,

I'm creating a new entry using the following:

mysql_query ("INSERT INTO agents (agent_name)
   VALUES ('$agentname')
but I need to find out the ID value it created, how can I do this 
easily?

Thanks

Chris




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] How to find the last ID?

2003-06-06 Thread Chris Payne
Hi there everyone,

I'm creating a new entry using the following:

mysql_query ("INSERT INTO agents (agent_name) 
   VALUES ('$agentname')

but I need to find out the ID value it created, how can I do this easily?

Thanks

Chris