I need to do something that seems to be very simple:
$bdd->query('UPDATE mytable SET aaa = \''.$aaa.'\', bbb = \''.$bbb.'\' WHERE name = \''.$name.'\'');
My problem: I have multiple records that match this "WHERE", and I want to update only the most recent one (I have a date and an id that can be used to define which record is the most recent)
How can I change my WHERE to add something like "AND id = the_highest_id_of_this_query"?