PHP querying MySQL returning Multiple Rows with only one Date
<p>I always get confused when working with dates in PHP and MySQL.  I looked through other posts, but couldn't find a solution,</p>

<p>I have a simple blog stored in a database that echos records when queried.  I get multiple rows with multiple entries, but the date is the same on all of them.</p>

<p>The dates are stored with MySQL timestamp in a column called 'TimeStamp' and are formatted this way in the database:
2011-12-29 21:16:55 (for example).</p>

<p>Here's the query:</p>

<pre><code>$set_select_sql = "SELECT * 
    FROM  `table` 
    ORDER BY  `table`.`TimeStamp` DESC 
    LIMIT 0 , 30";
$set_query = mysql_query($set_select_sql);
$HowMany=mysql_num_rows($set_query);
$time = date("g:i a", strtotime(mysql_result($set_query,0,'TimeStamp')));
$date = date("F j, Y ", strtotime(mysql_result($set_query,0,'TimeStamp')));
$blogpost = mysql_result($set_query,0,'blogpost');

mysql_data_seek($set_query, 0);
$r = 0;
while ($r &lt;= $HowMany) {
    $row = mysql_fetch_assoc($set_query);
    if ($row == FALSE) {
    } else {
        extract($row);

        echo "It was $time on $date when I posted this.&lt;br/&gt;";
        echo "$blogpost"
    }
    $r++
</code></pre>

<p>Why am I only getting one date?
What am I missing?</p>

<p>Thanks!</p>
