|
your sockapaloooozers:
1,002 knitters from 26 countries! (wanna see where they all are? google map coming soon!)
brown = finished!
Take me to a random palooza blog!
Take me to a random finished socker!
$host="localhost";
$database="knitalong";
$username="david";
$password="fob+s";
$table="members2007";
$color_normal = "#6A5ACD";
$color_finished = "#CC9966";
// connect to database
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
function construct_list($to, $title)
{
global $table;
global $result;
global $record;
global $color_normal;
global $color_finished;
echo "$title
\n";
while( (list($name, $weblog, $isfinished, $finished_url) = $record) && strtoupper($name) <= strtoupper(chr(ord($to)+1)))
{
if( $isfinished )
{
if( $finished_url != "" )
echo "$name \n";
else if( $weblog != "" )
echo "$name \n";
else
echo "$name \n";
}
else
{
if( $weblog != "" )
echo "$name \n";
else
echo "$name \n";
}
$record = mysql_fetch_array($result);
}
echo " | ";
}
// ------ create ADVANCED lists --------
echo "";
$query = "SELECT name, weblog, not isnull(finished) AS isfinished, finished_url FROM " . $table . " WHERE beginner=0 AND exclude=0 ORDER by name";
$result = mysql_query($query);
$record = mysql_fetch_array($result);
construct_list("A", "#-A");
construct_list("C", "B-C");
construct_list("F", "D-F");
construct_list("I", "G-I");
construct_list("J", "J");
construct_list("K", "K");
echo " | \n";
construct_list("L", "L");
construct_list("M", "M");
construct_list("R", "N-R");
construct_list("S", "S");
construct_list("Z", "T-Z");
// ------ create BEGINNERS list --------
$query = "SELECT name, weblog, not isnull(finished) AS isfinished, finished_url FROM " . $table . " WHERE beginner!=0 AND exclude=0 ORDER by name";
$result = mysql_query($query);
$record = mysql_fetch_array($result);
construct_list("Z", "Beginners");
echo " ";
?>
Follow the progress of all the sockapalooza participants on the knit pligg! (More info and faq on my blog.)
|
all content, design, and images © 2007 alison hansel
| |