[SOLVED] Using Custom Links on List Page with INNER JOINs |
9/19/2012 3:23:30 PM |
PHPRunner General questions | |
L
lane author
Hello everyone,
$value = "<a href=\"fruit_edit.php?editid1=".urlencode($data["fruit_type"])."\">".$data["fruit_type"]."<a/>";
|
|
![]() |
Sergey Kornilov admin 9/20/2012 |
I'm not 100% sure I understand the problem but here I go. |
L
|
lane author 9/20/2012 |
I'm not 100% sure I understand the problem but here I go. Instead of joins you need to use Lookup wizards. Setup fruit_type field as a Lookup wizard in PHPRunner. Use fruit as a lookup table, fruit_id as a link field, fruit_type as a display field. This is it, you get all functionality you need. Display field value will be displayed on List/View pages automatically.
$value = "<a href=\"fruit_edit.php?editid1=".urlencode($data["fruit"])."\">".$data["fruit"]."<a\>";
|
![]() |
Sergey Kornilov admin 9/20/2012 |
Okay, this makes sense. You need to be able to access both fruit_id and fruit_type field values from lookup table. Luckily there is a way. $value = "<a href=\"fruit_edit.php?editid1=".$data["fruit_type"]."\">".$value."</a>";
|
L
|
lane author 9/20/2012 |
Okay, this makes sense. You need to be able to access both fruit_id and fruit_type field values from lookup table. Luckily there is a way. When you use 'View as' Custom you have access to display field via $value and to link field via $data["fieldname"]. That being said here is how your example is supposed to look: $value = "<a href=\"fruit_edit.php?editid1=".$data["fruit_type"]."\">".$value."</a>";
|