Page 1 of 1

ดูให้หน่อยซิค่าว่าผิดตรงไหน ทำไมไม่griup ตรง $gp ให้ค่ะ

Posted: 14/02/2006 6:55 pm
by garf1918
<?
$cmdstr = "select detail,subject,last_upd,file_name from content where last_upd <= sysdate group by detail,subject,last_upd,file_name";
$parsed = ociparse($cn, $cmdstr);
ociexecute($parsed);
$nrows = ocifetchstatement($parsed,$results);
for ($i = 1;$i < $nrows;$i++){
$gp=$results["GROUPID"][$i];
$d1=$results["DETAIL"][$i];
$d2=$results["SUBJECT"][$i];
$d3=$results["LAST_UPD"][$i];
$fn=$results["FILE_NAME"][$i];
if($gp<>'Monthly closing rate'){
echo "<h3>".$gp,":"."</h3>\n";
echo "<li>".$d1," (","<a href='attachs/$fn'>".$d2."</a>",") ",$d3."<p>";
if($fn<>""){
echo "<img src='attachs/$fn'><p>";}
}else{
echo "<h3>".$gp,":"."</h3>\n";
echo "<img src='attachs/$fn'>\n";}
}
?>
ต้องการให้กรุ๊ปตรง $gp ตามตัวอย่าง
$gp
. $d1,$d2,$d3
$fn
$gp
. $d1,$d2,$d3
$fn
$gp
. $d1,$d2,$d3
$fn