i'm guessing you use mysql, so...
you can use the mysql_insert_id to retrieve the most recent addition, then
select on it
$sql=select [the auto_increment field] from table1 where id='$newid';
Does that help?
Morten Nielsen wrote:
> I got the following insert statement in my PHP code:
> $qid = db_query("
> INSERT INTO table1 (
> ) VALUES (
> This is working like I want it to. But in the table there is a column, which
> is AUTO_INCREMENT. I would like to retreive this number right after I added
> the data.
> Can anybody help me?
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php