when Details <0 change cell-color |
12/11/2007 11:57:29 AM |
PHPRunner General questions | |
I'm trying to display a "masterkey" cell (i.e. "orders") in a different color when details are found. Simplified that would be something like: |
|
J
|
Jane 12/12/2007 |
Hi, global $conn; print_r($row); $str = "select * from DetailTable where DetailID=".$data["MasterID"]; $rs = db_query($str,$conn); if (!$data = db_fetch_array($rs)) { //change style if there are no records in the detail table for this MasterID $row["shadeclass"] = "class=\"yournewclass\""; $row["shadeclassname"] = "yournewclass"; }
|
|
scuba author 12/12/2007 |
Jane, thanks for helping. |
J
|
Jane 12/13/2007 |
Hi,
and replace it with this one: <TD vAlign=middle align=middle><A {if $row.1detailsfound_value}class=tablelinks2{else}class=newclass{/if} id=master_DetailTable_add href="DetailTable_list.php?" {if $useAJAX} ... {/if}>DetailTable</A></TD>
|
|
scuba author 12/13/2007 |
Thanks Jane, works great!! |
|
scuba author 12/14/2007 |
Jane, |
![]() |
Alexey admin 12/14/2007 |
Hi, |
|
scuba author 12/18/2007 |
I've uploaded the project to demo account. |
J
|
Jane 12/18/2007 |
answered in your personal email. |