I am using
to pull the last id number out of my database, and using the last line to delete the test value it inserts. That works fine, and the number that it pulls is correct the first time, but if I refresh it to make sure that it is still running correctly, the number will increase, yet when I check the database there are no new values. Any ideas on what is going on?Code:$link = mysql_connect('*login info*'); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db('database'); mysql_query("INSERT INTO db (phrase) values ('test')"); printf("Last inserted record has id %d\n", mysql_insert_id()); mysql_query("DELETE FROM db WHERE id=" .mysql_insert_id() ."")








Bookmarks