This topic is locked
[SOLVED]

 Show image from MasterTable in the DetailTable problem

3/25/2009 7:34:06 AM
PHPRunner General questions
M
maali author

Hi
I am trying to show an image which is in the MasterTable in the DetailTable "XXXX_view.htm" file.

The values I use key1 & key2 are curect and are from DetailTable which is the same on the MasterTable "http://localhost/notebook/output/userss_imager.php/?field=image&key1=4&key2=maali"; But it dose not show the image!!!
How can I get userss_imager.php to lookup from my MasterTable while i use "XXXX_view.htm" from the DetailTable?
Please I need to know this <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=11346&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' /> Can any one help.
I am a beginer in using the PHPRunner.
Best Regards

Maali

J
Jane 3/25/2009

Hi,
use custom event (Insert PHP code snippet option on the Visual Editor tab) for this purpose.

Here is just a sample:

if (@$_REQUEST["editid1"] && @$_REQUEST["editid2"])

echo "<img src=\"mastertablename_imager.php?field=FieldName&key1=".$_REQUEST["editid1"]."&key2=".$_REQUEST["editid2"]."\">";

M
maali author 3/25/2009

Hi Jane
Thanks for the tip. But how do I than transfer the userid_value & username_value from my forumchild_view.htm file to the "function forumchild_snipped(&$params)". I use forumchild_snipped(&$params,$userid,$username) which did not work <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=39427&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
"http://localhost/notebook/output/userss_imager.php/?field=image&key1=$userid&key2=$username";
BR

Maali

J
Jane 3/25/2009

Maali,
you can select these values from database:

global $dal;

if (@$_REQUEST["editid1"] && @$_REQUEST["editid2"])

{

$rs = $dal->forumchild->Query("KeyField1=".$_REQUEST["editid1"]." and KeyField2=".$_REQUEST["editid2"],"");

$data = db_fetch_array($rs);

echo "<img src=\"mastertablename_imager.php?field=FieldName&key1=".$data["userid"]."&key2=".$data["username"]."\">";

}

M
maali author 3/25/2009

Hi Jane
Thanks for the tip.
I fixet it in this way <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=39458&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> and it works eventho there are no record called image in the detail table.
added to the "xxx_list.php" file

=====================

//image

$value="";

$value = "<img";

$value.=" border=1";

$value.=" width=70";

$value.=" height=50";

$value.=" src=\"userss_imager.php?field=image&key1=".$data["userid"]."&key2=".$data["username"]."\">";

$record["image_value"]=$value;
$xt->assign("image_fieldheadercolumn",true);

$xt->assign("image_fieldcolumn",true);

$xt->assign("image_fieldfootercolumn",true);
added to the "xxx_list.htm" file

=====================
{BEGIN image_fieldcolumn}<TR>

<TD class=shade style="WIDTH: 5%" width=208><P align=right>{$image_value}</P></TD>

<TD width=486 </TD></TR>

{END image_fieldcolumn}
BR

Maali