I have a form with two stages, the first is to put the information but the second is the UPDATE to add the photo. So what I want to do is retrieve the last auto incremented ID to update the data, I used LAST_INSERT_ID ()
but I realize it is the update everywhere. Do you have a suggestion for me to help me? Thank you and sorry sorry for my english.
You can see here what I did:
$sql = 'UPDATE 'jj_news' SET
cover_picture="'.$large_image_name.$_SESSION['user_file_ext'].'",
min_picture="'.$thumb_image_name.$_SESSION['user_file_ext'].'", statut="1",
edited="'.date('Y-m-d h:i:s').'" WHERE id_news= LAST_INSERT_ID(id_news)';
mysql_query($sql) or die('Erreur SQL !'.$sql.'<br />'.mysql_error());