I want to get the last index of my table, in order to remove the last row added.
I have 2 functions
addRow() wich adds a new row and removeRow() which remove row. I use mysql_insert_id() in the addRow function to return the last index. The thing is I’m trying to get it and the use it in the secon function but it doesn’t work.
How can id do it
here is my code
function addRow()
(...) // add a new row
return mysql_insert_id ();
function removeRow($id)
(...)// remove the
$index = addRow();
if (isset(...))
removeRow($index);
how can i do it ?