require_once("conn.php"); //require_once("access.php"); require_once("templates/header.php"); $title = "Newest domains"; $q1 = "select * from domain_domains, domain_categories where domain_domains.categoryid = domain_categories.categoryid order by domain_domains.domainid desc limit 0,9"; $r1 = mysql_query($q1) or die(mysql_error()); $col = "white"; while($a1 = mysql_fetch_array($r1)) { if($col == "white") { $col = "#dddddd"; } else { $col = "white"; } //get the votes $q2 = "select sum(vote)/count(voterid) as AvaragePrice, count(voterid) as other from domain_vote where domainid = '$a1[domainid]' "; $r2 = mysql_query($q2) or die(mysql_error()); $a2 = mysql_fetch_array($r2); $DomainRows .= "