At 13:19 22.8.2001 +0200, you wrote:
>LAST_INSERT_ID() should return the last autoincrement value of
>the last insert

Yep it sure did, managed to get to machine and test it out. Total mess.

but;

$query = "SELECT LAST_INSERT_ID()";
$result = mysql_query($query);
if ($result) {
$nrows = mysql_num_rows($result);
$row = mysql_fetch_row($result);
$lastID = $row[0];
}

was a code sent to me and if it helps anyone there it is, do not know who 
is the original author but this takes the Id from first insert in you put 
it after it and then you can use the $lastID in following inserts, works fine.

Jari Mäkelä


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to