Thursday, 10 June 2010



Its official I am the world's slowest human being


/*
Eleanor Dare May 2010
Get data from database
get highest values
and make into
links for art sites



*/


$url1= "http://www.computerfinearts.com/collection/abrahams/happymoving/";
$url2="http://www.computerfinearts.com/collection/ahn/inbetween/";
$url3= "http://www.computerfinearts.com/collection/amerika/htc1.0/";
$url4= "http://www.computerfinearts.com/collection/andrews/";
$url5= "http://www.computerfinearts.com/collection/biggs/echelon";
$url6= "http://www.computerfinearts.com/collection/bravo/playingwtime/";
$url7= "http://www.computerfinearts.com/collection/breeze/SOM/";
$url8= "http://www.computerfinearts.com/collection/brucker_cohen/";
$url9= "http://irational.org/cgi-bin/photo/photo.pl";
$url10= "http://www.computerfinearts.com/collection/burton/fields/";
$url1= "http://www.computerfinearts.com/collection/cahen/louvre_01_15_05/";
$url12= "http://www.computerfinearts.com/collection/campbell/annesykes/";
$url13= "http://www.computerfinearts.com/collection/chatonsky/revolution_new_york/#";
$url14= "http://www.computerfinearts.com/collection/cloninger/bubblegum/";
$url15= "http://www.computerfinearts.com/collection/coyarzun/wIPhOME/";
$url16= "http://www.computerfinearts.com/collection/daggett/referprint/";
$url17= "http://www.computerfinearts.com/collection/deck/MEMORY.MIL/";
$url18= "http://www.computerfinearts.com/collection/decologne/predator/";
$url19= "http://www.computerfinearts.com/collection/dekok/zabnulvier/";
$url20= "http://www.computerfinearts.com/collection/doctorhugo/dreamz/";
$url21= "http://www.computerfinearts.com/collection/drouhin/ici/";
$url22= "http://www.computerfinearts.com/collection/easylife.org/xxx/lo.html";
$url23= "http://www.computerfinearts.com/collection/garrett/email_art/";
$url24= "http://www.computerfinearts.com/collection/geuzen/brains/";
$url25= "http://www.computerfinearts.com/collection/leegte/scrollbars/main.htm";


$match = "match";
$username="secret";
$password="secret";
$database="secret";
$view = array();

mysql_connect("mysql02.iomart.com",$username,$password);


$dbuser="sec";
$dbpass="sec";
$dbname="sec"; //the name of the database
$chandle = mysql_connect("mysql02.iomart.com", $dbuser, $dbpass)
or die("Connection Failure to Database");
mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);

$mainsection="links"; //The name of the table where web links are stored

$query1="SELECT MAX(`item`), MAX(`item1`), MAX(`item2`), MAX(`item3`),MAX(`item4`), MAX(`item5`), MAX(`item6`),MAX(`item7`) ,MAX(`item7`) FROM Vains_test1 WHERE mood = 'sad'"; //select all approved links that belong to the current category
$result = mysql_db_query($dbname, $query1) or die("Failed Query of " . $query1); //do the query


$item1 = $result[3];

while($thisrow=mysql_fetch_row($result))
{
$i=0;
while ($i < mysql_num_fields($result))
{
$field_name=mysql_fetch_field($result, $i);
//echo $thisrow[$i] . "
"; //Display all the fields on one line

$item = $thisrow[0];
$item1 = $thisrow[1];
$item2 = $thisrow[2];
$item3 = $thisrow[3];
$item4 = $thisrow[4];
$item5 = $thisrow[5];
$item6 = $thisrow[6];
$item7 = $thisrow[7];
$item8 = $thisrow[8];
$i++;
}
/*
echo "
"; //put a break after each database entry

echo($item." item
");
echo($item1." item1
");
echo($item2." item2
");
echo($item3." item3
");
echo($item4." item4
");
echo($item5." item5
");
echo($item6." item6
");
echo($item7." item7
");
echo($item8." item8
");


echo("FF
");
*/
$maxo = max($item, $item1, $item2, $item3, $item4, $item5, $item6, $item7, $item8);
echo "Top Matches
";
echo "
";
echo "
";
//echo "MAXO:".$maxo."
";
if($item == $maxo){//echo "MAXO item
";
$banner = " ";
$banner.= "$banner.= "width=\"100\" height=\"100\" >";
$banner.="
";
echo( $banner );

}

if($item1 == $maxo){//echo "MAXO item1
";
$banner = " ";
$banner.= "$banner.= "width=\"100\" height=\"100\" >";
$banner.="
";
echo( $banner );
}

if($item2 == $maxo){//echo "MAXO item2
";
$banner = " ";
$banner.= "$banner.= "width=\"100\" height=\"100\" >";
$banner.="
";
echo( $banner );

}

if($item3 == $maxo){//echo "MAXO item3
";

$banner = " ";
$banner.= "$banner.= "width=\"100\" height=\"100\" >";
$banner.="
";
echo( $banner );
}

if($item4 == $maxo){//echo "MAXO item4
";

$banner = " ";
$banner.= "$banner.= "width=\"100\" height=\"100\" >";
$banner.="
";
echo( $banner );
}

if($item5 == $maxo){//echo "MAXO item5
";
$banner = " ";
$banner.= "$banner.= "width=\"100\" height=\"100\" >";
$banner.="
";
echo( $banner );

}

if($item6 == $maxo){//echo "MAXO item6
";

$banner = " ";
$banner.= "$banner.= "width=\"100\" height=\"100\" >";
$banner.="
";
echo( $banner );

}

if($item7 == $maxo){//echo "MAXO item7
";

$banner = " ";
$banner.= "$banner.= "width=\"100\" height=\"100\" >";
$banner.="
";
echo( $banner );
}

if($item8 == $maxo){//echo "MAXO item8
";

$banner = " ";
$banner.= "$banner.= "width=\"100\" height=\"100\" >";
$banner.="
";
echo( $banner );


}


}

?>

No comments:

Post a Comment