Array & loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am creating a results page for completed and uncompleted procedures.  I am
repeating a lot of the code and wonder if there is an easier way to do this.
$neh="select * from pro_list, complete_pro where pro_list.pro_name
='Neurological Exam/History'
and complete_pro.proid=pro_list.proid
and complete_pro.sysid='$sysid'
and complete_pro.transid='$transid'";
$resneh=safe_query($neh);
while ($rown=mysql_fetch_array($resneh)){
$compl_date1=$rown['compl_date'];
}
echo "<p>1. Neurological Exam and History $compl_date1";

$neh="select * from pro_list, complete_pro where pro_list.pro_name ='Ankle
Arm BP Measurement'
and complete_pro.proid=pro_list.proid
and complete_pro.sysid='$sysid'
and complete_pro.transid='$transid'";
$resneh=safe_query($neh);
while ($rown=mysql_fetch_array($resneh)){
$compl_date2=$rown['compl_date'];
}
 echo "<P>2. Ankle/Arm BP Measurement $compl_date2"; and so on and so on...

It seems that I could use a 'for' loop in the searches, but how do I
populate the result fields (some of which will be empty) with the
appropriate tests.
Any thoughts.
Ozzie


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux