Hiding Order details link from Orders list if there's no order det |
4/7/2008 11:17:59 AM |
PHPRunner General questions | |
F
Fawaz author
Hi All, |
|
J
|
Jane 4/8/2008 |
Fawaz, {if $row.1showdetail} <A href="detailtable_list.php?{$row.1detailtable_masterkeys}" {if $useAJAX} onmouseover="RollDetailsLink.showPopup(this,'detailtable_detailspreview.php'+this.href.substr(this.href.indexOf('?')));" onmouseout="RollDetailsLink.hidePopup();" {/if}>detailtable</A> {/if}
$row["1showdetail"] = true; //or $row["1showdetail"] = false; |
N
|
nickrix 4/14/2008 |
Fawaz, you can do it editing page in the HTML mode on the Visual Editor tab. Here is a sample: Then count detail records on the List page: After record processed event and assign true or false to $row.1showdetail variable:
|
J
|
Jane 4/15/2008 |
Hi, {if $row.1showdetail} <A href="detailtable_list.php?{$row.1detailtable_masterkeys}" {if $useAJAX} onmouseover="RollDetailsLink.showPopup(this,'detailtable_detailspreview.php'+this.href.substr(this.href.indexOf('?')));" onmouseout="RollDetailsLink.hidePopup();" {/if}>detailtable</A> {/if} //select count of values from detail table global $conn; $str = "select count(*) from detailtable where detailid=".$data["masterid"]; $rs = db_query($str,$conn); if ($data = db_fetch_array($rs)) $row["1showdetail"] = true; else $row["1showdetail"] = false; |