Counting Referral Contest MYSQL/PHP Problem

I'm creating a referral contest for my site
Now i need it to stop counting referrals on the contest page when i reached 1000members in total

I have created a config file with de code below in

$end = 1000;

The conest.php file is selecting the top 10 referrals like i want it
But now i dont know wich code i need to add to stop counting
Anyone can help me?

The contest.php file

<? include("header.php");?>
<table width="85%" border="0" cellspacing="5" cellpadding="5" align="center">
<p align="center"><font size="2"><br>
</font><b>Contests</b><font size="2"><br>
<p><font size="2"><b>Below are the current contests:</b></font></p>
<p><font face="Arial" size="2">- Referral contest<br>

require ('config.php');

$tablaaa = mysql_query("SELECT * FROM tb_users ORDER BY referals DESC LIMIT 10");

while ($registroe = mysql_fetch_array($tablaaa)) {

echo "
<td>". $registroe["username"] ."</td>
<td>". $registroe["referals"] ."</td>

<font size="2"><br>
<hr align="left">
<? include("footer.php");?>

Now what do i need to add to stop mysql count on the amount i setup in the config file?

Share this

Related Posts