Count Userid In Last 5 Results
<p>I need to know if the last 5 entry's in a table were placed by the same userid (in the code below the user id is <code>frozen_by</code>.</p>

<p>Here's what I have</p>

<pre><code>//count if the last 5 freezes was placed by the same user

$strFind="SELECT COUNT(*) AS `total` FROM `contest_frozen` WHERE `contest_id`=\"$pid\" AND `frozen_by`=\"$curmemid\" ORDER BY `id` DESC LIMIT 5";
$result=mysql_query($strFind) or die(mysql_error());
$row=mysql_fetch_array($result);
$freeze_total=$row['total'];

if($freeze_total&gt;=5){
//do this
}

if($freeze_total&lt;5){
//do this
}
</code></pre>
