Dear Daarius,
here is my code.
mysql_query("INSERT INTO newaltesweb (id,ts,idnivelpnl,fechaalta,nombre,apellidos,domicilio,codpos,poblacion,provincia,pais,email,telefono,fax,profesion,sexo,fechanacimiento,estudios,conocimientospnl,idioma) VALUES(0,NOW(),'$conocimientospnl',NOW(),'$nombre','$apellidos','$domicilio','$codpos','$poblacion','$provincia','$pais','$email','$telefono','$fax','$profesion','$sexo','$frm_date_bir','$estudios','$conocimientospnl',1)",$sql_connection);
$referencia=mysql_insert_id();
As you can see I don't close the link so... it is so extrange. If it is helpful to you, I'm working with de PHP4.
If I comment the mysql_insert_id() it returns me the warning too.
I've tried to use the query, for debbuging, and put the query into db, and MySQL, doesn't return me any warning (on console mode).
Thanks again