Visa ett inlägg
Oläst 2007-10-22, 22:54 #6
SimonPs avatar
SimonP SimonP är inte uppkopplad
Mycket flitig postare
 
Reg.datum: May 2006
Inlägg: 832
SimonP SimonP är inte uppkopplad
Mycket flitig postare
SimonPs avatar
 
Reg.datum: May 2006
Inlägg: 832
mysql_query("LOCK TABLES mintabell WRITE") or die("error");
$result = mysql_query("SELECT MAX(ID) AS LAST_ID FROM mintabell") or die("error");
$result = mysql_fetch_array($result);
echo "Last id = " . $result[LAST_ID];
mysql_query("UNLOCK TABLES");

Ovanstånde ska vara säkert.
SimonP är inte uppkopplad   Svara med citatSvara med citat