$c
"; } else { $mc = mysql_connect($mysql_host, $mysql_user, $mysql_pass) or die ("Cannot open mysql connection"); $numtable = mysql_list_tables($mysql_db); srand ((double) microtime() * 1000000); $c = mysql_num_rows($numtable); $randval = rand(1, $c); $d = 1; while ($d <= $randval){ $d++; $e = mysql_fetch_row($numtable); } $table=$e[0]; $q1 = mysql_query("select COUNT(*) from $table"); $qq1 = mysql_fetch_row($q1); srand ((double) microtime() * 1000000); $randval = rand(1, $qq1[0]); $q2 = mysql_query ("select fortune from $table where id='$randval'"); $qq2 = mysql_fetch_row($q2); echo "
$qq2[0]
"; } ?>