";
}
//$query1= "select fb2.name, fb2.value,fb6.value,fb11.value,fb17.value,fb34.value,fb53.value,fb87.value,fb129.value,tblDataCodes.fips,tblDataCodes.iso,fb0.value,fbURLs.value,$dataTable.value from fb2,fb6,fb11,fb17,fb34,fb53,fb87,fb129,tblDataCodes,fb0,fbURLs,$dataTable where (fb2.name=fb6.name and fb2.name=fb11.name and fb2.name=fb17.name and fb2.name=fb34.name and fb2.name=fb53.name and fb2.name=fb87.name and fb2.name=fb129.name and fb2.name=tblDataCodes.name and fb2.name=fb0.name and fb2.name=fbURLs.name and fb2.name=$dataTable.name and (fb0.value LIKE \"%independent%\") and ".$theCondition.") order by fb2.name";
if($theTitle!="Top 20 Living Computer Scientists")
{
$query1="SELECT * FROM topPeoplebyOccupation where topPeoplebyOccupation.profession = 'Physicists' order by topPeoplebyOccupation.score desc LIMIT 20";
}
else
{
$query1="SELECT * FROM topPeoplebyOccupation where topPeoplebyOccupation.profession = 'Physicists' order by topPeoplebyOccupation.score desc LIMIT 20";
}
if($theTitle==="Richest Women in the World")
{
$query1="SELECT * FROM table_billionaires_2010 WHERE (table_billionaires_2010.gender LIKE \"female\")order by table_billionaires_2010.netWorth desc LIMIT 29";
}
//echo $query1;
$result=mysql_query($query1);
$selections="";
$position=1;
while (($line = mysql_fetch_array($result)))
{
$name=$line[1];
$selections=$selections."";
$position=$position+1;
}
$number_of_results=mysql_num_rows($result);
if($slide>$number_of_results){$slide=1;}
$countdown=$number_of_results-$slide+1;
//mysql_data_seek($result, $slide-1);
mysql_data_seek($result, $number_of_results-$slide);
$line=mysql_fetch_array($result);
$profession=$line[0];
$name=$line[1];
$url=$line[2];
$score=$line[3];
$nationality=$line[4];
$gender=$line[5];
$fields=$line[6];
$institutions=$line[7];
$almamater=$line[8];
$knownfor=$line[9];
$notableawards=$line[10];
$imageurl=$line[11];
$imagesourceurl=$line[12];
$fileData="