This topic is locked

Records which link to other records in same table

6/30/2005 12:03:42 PM
PHPRunner General questions
author

I'm designing a simple family tree db which is at present just a flat table

In which each record everyone has a father & mother, a variable number of wives,and variable number of children.

The links to other family tree members is always the record_id of another record.
At present I'm manually inserting the "links" eg my father is record_id 52, my mother recordid 60 my children records 100,101,102
I can write queries to display everyone's father mother children etc no problem.

  • But My question is
    How can I get PhpRunner to recognise that these fields are linked (ay mysql table design level?)
    I.E Is it possible/useful to define any sort of relationships/linking the wife/father/mother/children fields and the recordid of other records
    I'm fogging on this, your advice pls

500267 6/30/2005

Hi

having read a post here, I'm getting the idea, you have to do the intelligent stuff, in the "formatting window" step 8 where you can select lookup.
Anything other tips?

Sergey Kornilov admin 7/1/2005

Hi,
you can use lookup wizard for this purpose.

Use the same table as Lookup table, set record_id field as Link field and Name field (for example) as Display field.

500268 7/1/2005

Hi,

I have a number of problems with runner
I have a drop down from a lookup with invisible options
see
<option value="35">Richard Rayner 1785-1872</option><option value="36"></option><option value="37"></op...
Which is generated from

concat(firstname,' ',familyname,' ',birth,'-',death)
I also have fields varchar(255) telling that me that will only accept numbers when I try to save my edit.
My longtext fields are editable but I cannot "view" them as they are seenas in image or binary

500269 7/1/2005

Hi,

Sorry some of above is my fault
Forget the lontgext binary problem.
but there is a problem with the lookup if either the birth or death is 0 or null, then the option label is null ###YOU MUST BE CAREFULL with CONCAT### if it finds a problem it returns NULL
So my last actual problem is why when I try to save a record varchar(255) I am told it will only accept a number?

zzapper 7/2/2005

Hi Yorl
I solved all my problems, by starting again from scratch!!