$sql="SELECT TOP(id) FROM divxtemp";
     $res=mysql_db_query("DB",$sql) or die (mysql_error());
     $reg=mysql_fetch_array($res);
     $id=$reg["id"]+1;
     $sql="INSERT INTO divxtemp (titulo,cds,id) VALUES
('$titulotxt','$cdstxt','$id')";
     mysql_db_query("DB",$sql) or die (mysql_error());

the id is always 1 so he can't save duplicate keys...

what i'm doing wrong? : \

thanks...




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

Reply via email to