mysql – Update with higher ID

I need an update in the table Photos where you will register only in the largest ID of the table, but it is not giving.

$ sql = "select * from photos order by id desc limit 1";
$ sql_insert = "UPDATE photos set foto1a =: TARGET_FILE_NAME WHERE id = & # 39; $ id & # 39;";
$ stmt = $ PDO -> prepare ($ sql_insert);
$ stmt -> bindParam (& # 39 ;: TARGET_FILE_NAME & # 39 ;, $ target_file_name);
$ stmt -> execute ();