of the day
oink file
oinky choknat
zodiacs
download
pigcow
of 2009
ni papa
of the trade
and events
me via..
section
and thank you
about anything
to other site
of pig n cow
|
|
|
|
loading
Lotto ni Oink |
database |
This is where you put your numbers.. from 1 to 49 in the boxes.
requested by my papa, kasi gusto niya makita yung mga tally ng numbers so i made one.
/* Global Variables */
$howmany=50; /* List how many numbers in database to pick - 1 ex.50-1=49 numbers*/
$username="oinkoink";
$password="hackercrash08";
$database="oinkoink_db";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM lotto";
$result=mysql_query($query);
$num=mysql_numrows($result);
/* Listing all tally the hard way, still searching for shorter method */
$i=01;
echo "\n";
echo "";
echo "\n";
while( $i < $howmany ){
${r.$i}=mysql_query("SELECT * FROM lotto WHERE first=$i OR second=$i OR third=$i OR fourth=$i OR fifth=$i OR sixth=$i ");
${test.$i}=mysql_num_rows(${r.$i});
echo "$i = \n";
echo "${'test'.$i} \n";
$i++;
}
echo " | \n";
echo " | ";
echo "\n\n";
echo "";
echo "Date | \n";
echo "Result | \n";
echo " ";
$i=0;
while ($i < $num) {
$month=mysql_result($result,$i,"month");
$day=mysql_result($result,$i,"day");
$year=mysql_result($result,$i,"year");
$one=mysql_result($result,$i,"first");
$two=mysql_result($result,$i,"second");
$three=mysql_result($result,$i,"third");
$four=mysql_result($result,$i,"fourth");
$five=mysql_result($result,$i,"fifth");
$six=mysql_result($result,$i,"sixth");
echo "";
echo "$month $day $year | \n";
echo "$one-$two-$three-$four-$five-$six | \n";
$i++;
}
echo " \n | \n";
echo "
\n\n";
mysql_close();
?>
|
|
|
|
|