Returns a random floating-point value in the range 0 to 1.0. If an integer argument N is specified, it is used as the seed value:
mysql> select RAND();
-> 0.5925
mysql> select RAND(20);
-> 0.1811
mysql> select RAND(20);
-> 0.1811
mysql> select RAND();
-> 0.2079
mysql> select RAND();
-> 0.7888
$resultMitte2 = mysql_query("select * from TBALE where BLABLA ") or die ("Datenbankfehler!");
$Anzahl2 = mysql_num_rows ($resultMitte2)-1;
$AdId2=randomA(1,$Anzahl2);
mysql_data_seek($resultMitte2,$AdId2);
$row_data=mysql_fetch_array($resultMitte2);
echo "<center>".$row_data["w88"]."<BR></center>";
$idc=$row_data["wid"];
$CountHit = "update TABLE set COLO = COL + 1 where COL2=$idc";
mysql_query ($CountHit,$mysql_link);
}
Kommentar