retrieveing last index made
Posted: Thu Oct 05, 2006 10:53 pm
I have a MYSQL DB that has a Primary Index that auto increments. So, when I add a new artist to the db I have a query like this:
$query = "INSERT INTO `ARTISTS` (`FirstName`, `LastName`, `Phone`, `Address1`, `Address2`, `City`, `State`, `Zip`, `Email`, `Process`, `About`) VALUES ('$FirstName', '$LastName', '$Phone', '$Address1', '$Address2', '$City', '$State', '$Zip', '$Email', '$Process', '$About')";
Now, after I add that artist, I would also like to upload an image of that artist for that personal touch. How do I call up the index that was just created for that row so I can name the new image with that key (eg 1.jpg, 2.jpg, etc..)?
$query = "INSERT INTO `ARTISTS` (`FirstName`, `LastName`, `Phone`, `Address1`, `Address2`, `City`, `State`, `Zip`, `Email`, `Process`, `About`) VALUES ('$FirstName', '$LastName', '$Phone', '$Address1', '$Address2', '$City', '$State', '$Zip', '$Email', '$Process', '$About')";
Now, after I add that artist, I would also like to upload an image of that artist for that personal touch. How do I call up the index that was just created for that row so I can name the new image with that key (eg 1.jpg, 2.jpg, etc..)?