Page 1 of 1

retrieveing last index made

Posted: Thu Oct 05, 2006 10:53 pm
by trent2800
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..)?

Posted: Thu Oct 05, 2006 11:17 pm
by s.dot

Posted: Thu Oct 05, 2006 11:20 pm
by trent2800
Thanks, cant believe i missed that... I was staring at the mysql functions... ohh well.