This topic is locked

display more information (from query) in a master/detail page

1/19/2007 1:47:54 PM
PHPRunner General questions
C
ccadivel author

Hello,

I am using PHPRunner 3.1 with PHP 5 and mySQL 5.

I am programming a web application for a genealogy tree.

I use 2 tables :

INDIVIDU (

INDID int not null,

INDNOM varchar(60) not null,

INDPRE varchar(30),

INDSUR varchar(30),

INDDDN datetime,

INDLDN varchar(30),

INDSEX char(1),

INDDDD datetime,

INDLDD varchar(30),

INDACT varchar(60),

INDNOT text,

INDPER int,

INDMER int,

primary key (INDID));
PARTNER (

INDEPX int not null,

INDEPS int not null,

TYPEUNION varchar(30),

DATEDUNION datetime,

LIEUDUNION varchar(30),

primary key (INDEPX, INDEPS, DATEDUNION));
Given an INDIVIDU, I can display the children of the INDIVIDU or the parents of the INDIVIDU using the master/detail feature and modifying the generated code. But I need to display on the same page the parents and the children of and INDIVIDU.

Could you help me to do that please ?

Thank you

J
Jane 1/22/2007

Cris,
you can do it using JOIN clause in the SQL query.

Proceed to the Edit SQL query tab and edit your query.

Here is a sample:

select INDIVIDU.INDID,

INDIVIDU.INDNOM,

INDIVIDU.INDPRE,

INDIVIDU.INDSUR,

INDIVIDU.INDDDN,

INDIVIDU.INDLDN,

INDIVIDU.INDSEX,

INDIVIDU.INDDDD,

INDIVIDU.INDLDD,

INDIVIDU.INDACT,

INDIVIDU.INDNOT,

INDIVIDU.INDPER,

INDIVIDU.INDMER,

PARTNER.INDEPX,

PARTNER.INDEPS,

PARTNER.TYPEUNION,

PARTNER.DATEDUNION,

PARTNER.LIEUDUNION

from INDIVIDU inner join PARTNER

on (PARTNER.INDEPX=INDIVIDU.INDPER and PARTNER.INDEPS=INDIVIDU.INDMER)