This topic is locked

passing 2 list page values to edit page

6/23/2008 3:26:29 PM
PHPRunner General questions
D
dakk author

I have data from 3 tables many-to-many relationship displaying correctly on the list page via inner joins. On the list page I have the Edit Page link enabled. Wrong data is being passed to the edit page. I found out that I need 2 where clauses. On the Events, Edit Page, Before SQL Edit I hard codded the added where value as follows with good results:
$strWhereClause= whereAdd($strWhereClause, "ASSET_FK='33'");
Question is how do I replace the hard coded "33" value with the value of the selected row?

Thanks

J
Jane 6/24/2008

Hi,
here are some tips:

  1. edit detail link on the list page on the Visual Editor tab in HTML mode.

    Here is a sample:
    <A class=tablelinks id=master_DetailTableName{$row.1recno} href="DetailTableName_list.php?{$row.1DetailTableName_masterkeys}&assetfk={$row.1ASSET_FK_value}" {if $useAJAX} onmouseover="RollDetailsLink.showPopup(this,'DetailTableName_detailspreview.php'+this.href.substr(this.href.indexOf('?')));" onmouseout="RollDetailsLink.hidePopup();" {/if}>DetailTableName</A>


2. use following code in your event:

if (@$_REQUEST["assetfk"])

$strWhereClause= whereAdd($strWhereClause, "ASSET_FK='".$_REQUEST["assetfk"]."'");

D
dakk author 6/24/2008

Thanks Jane that worked. Have the reset page deleting the mod thing going on but I know what to add if I have to do a reset. If I have time I may tinker with the smarty template.