I want to be able to enter a new record and be able to type in a name or ID# for one spot which would pull information from the record referenced and place into the current file when viewing.
Feb 10, 2006, 4:18 PM
Veteran / Moderator (8669 posts)
Feb 10, 2006, 4:18 PM
Post #2 of 4
Views: 3043
It sounds like what you need is a relational database, where you would have two .db files. The contents of fields in one file would be available to the records of the other file. Is that what you want?
It would probably help if you were to give some more information about what you're wanting to do.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
It would probably help if you were to give some more information about what you're wanting to do.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Feb 11, 2006, 11:59 AM
Novice (10 posts)
Feb 11, 2006, 11:59 AM
Post #3 of 4
Views: 2995
I am looking for I have this record that has
Information 1
Information 2 - Information 2.1 - Information 2.2
Information 3 - Information 3.1 - Information 3.2
Where Information 2 would pick up certain fields that were entered into Information 2's own entry in the database, and Information 3 would pick up certain fields that were entered into Information 3's own entry into the database.
It's the same database just more passing the information into the next records data.
Information 1
Information 2 - Information 2.1 - Information 2.2
Information 3 - Information 3.1 - Information 3.2
Where Information 2 would pick up certain fields that were entered into Information 2's own entry in the database, and Information 3 would pick up certain fields that were entered into Information 3's own entry into the database.
It's the same database just more passing the information into the next records data.
Feb 11, 2006, 9:47 PM
Veteran / Moderator (8669 posts)
Feb 11, 2006, 9:47 PM
Post #4 of 4
Views: 3002
You can do this, but I don't think it's the best way to set up a database, if I understand what you're doing. I can't really tell, though, without more detail about your database.
For what you're wanting to do, you would need a field in each record that would hold the $db_key value for the other record. For illustration purposes, I'll call it other field. In sub html_record, you would add
%rec2=&get_record($rec{'other field'});
Then you can use the %rec2 hash the same way you use the %rec hash to print out the variables.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
For what you're wanting to do, you would need a field in each record that would hold the $db_key value for the other record. For illustration purposes, I'll call it other field. In sub html_record, you would add
%rec2=&get_record($rec{'other field'});
Then you can use the %rec2 hash the same way you use the %rec hash to print out the variables.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.