title: mysql updating last inserted id
body: <p>I want to update a table by getting the last inserted id but it is giving no results.
  here is the query :</p>
  
  <pre><code> $quer = mysql_query("UPDATE date 
                        SET d_startdate = '$start', d_enddate = '$end' 
                        WHERE d_id = LAST_INSERT_ID() AND d_sid = $id");
  </code></pre>
  
  <p>d_id is the primary key and d_sid is a foreign key of another table</p>