Is there a faster (better) way to do the following: 

if ($result) { 
for ($cluster=1;$cluster<200;$cluster++) { 
for($galaxy=1;$galaxy<26;$galaxy++) { 

$sql="insert into galaxy select avg(cluster) as gcluster,sum(size) as gsize,sum(score) 
as gscore,avg(galaxy) as ggalaxy from universe where cluster='$cluster' and 
galaxy='$galaxy'"; 
$result=db_query($sql); 

Thanks

Michael

Reply via email to