Master Detail relationship |
1/18/2008 8:27:42 AM |
PHPRunner General questions | |
N
nicolagrimshaw author
Hello |
|
J
|
Jane 1/21/2008 |
Hi,
|
N
|
nicolagrimshaw author 1/22/2008 |
Hi Jane, |
N
|
nicolagrimshaw author 1/22/2008 |
Hi global $conn; $str = "select * from _spa where spa-id=".$data["ID"]; $rs = db_query($str,$conn); if ($data = db_fetch_array($rs)) { $row["1detailsfound_value"]=true; } else { $row["1detailsfound_value"]=false; }
When I try using accommodation name which is both the primary and foreign key (which I though might fix the problem) I get the following error!
|
A
|
alang 1/22/2008 |
I've found its better to put quotes around the value. See http://www.asprunner.com/forums/index.php?...ost&p=24118 |
R
|
Rigmantas 2/16/2008 |
Hi, |
J
|
Jane 2/18/2008 |
Rimantas, |
L
|
laonian 2/20/2008 |
I have tried the above code and it works great. One more question about the preview: Is it possible to select only a few fields from the detail table to display in onmouseover preview, and when you click the link, you will still see the complete detail list page? The reason is you may have e.g. ten fields in your detail table and you list them all. But for master-detail relation preview, only a few fields, e.g. three, are important. |
J
|
Jane 2/21/2008 |
Hi,
|
L
|
laonian 2/21/2008 |
Hi, you can do the following:
|