voodoochicken Posted June 30, 2010 Share Posted June 30, 2010 hi, i need to find the key of the row i just added. I did not specify the row in the insert statement, since the field is set to autoincrease. the idea is something like this:$comando = "INSERT INTO DIBUJOS (DIBUJO) VALUES ('" . $_POST["dibujo"] . "')";$resultado = mysql_query($comando,$link);if ($resultado) // find key of the inserted arrow, mysql_query for insert return true or false ;else // something else ;any pointers?tnx! Link to comment Share on other sites More sharing options...
voodoochicken Posted June 30, 2010 Author Share Posted June 30, 2010 hi, i need to find the key of the row i just added. I did not specify the row in the insert statement, since the field is set to autoincrease. the idea is something like this:$comando = "INSERT INTO DIBUJOS (DIBUJO) VALUES ('" . $_POST["dibujo"] . "')";$resultado = mysql_query($comando,$link);if ($resultado) // find key of the inserted arrow, mysql_query for insert return true or false ;else // something else ;any pointers?tnx!ok, i found about 'mysql_insert_id()' Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.