how to get last inserted date in php MYSQL
<p>I have two tables, and I want to get the last enterd date.</p>

<p>The first table is <code>seeker</code>:</p>

<pre><code>seeker_nic-----username
111-------------ali
222-------------umer
333-------------raza
</code></pre>

<p>The second one is <code>requestblood</code>:</p>

<pre><code>id-------seeker_nic-----requireddate
1-------  111 ----------2012/10/9
2 ------- 222-----------2012/5/8
3 ------  111-----------2012/12/12
4 ------- 111-----------2012/11/12
5---------111-----------2012/09/09
6 ------- 222-----------2012/7/9
7 ------- 333 ----------2012/4/4
</code></pre>

<p>Now, I want to list the users one time with their last inserted date like..</p>

<pre><code>s.no---- username----- requireddate
 1------- ali---------- 2012/09/09
 2------- umer--------- 2012/7/9
 3------- raza--------- 2012/4/4
</code></pre>

<p>I am using this query, but it shows maximum date not the latest one.</p>

<pre><code>SELECT seeker.username, MAX(bloodrequest.requireddate) AS requireddate, COUNT(bloodrequest.requireddate) AS total
FROM seeker
JOIN bloodrequest
  ON seeker.seeker_nic = bloodrequest.seeker_nic
GROUP BY seeker.username
</code></pre>

<p>This shows the maximum date, and it shows total dates.  For example, 111 has total "4", but I don't know how to show the last inserted date... I am new in PHP, please help me.  :(</p>

<p>Thanks in advance!</p>
