This topic is locked

help with master details relationship

10/4/2006 12:18:31 AM
PHPRunner General questions
G
greghar author

Hi

I am testing out phprunner and have ran into two problems. First one I am setting up two tables in my test database. One we will call customers and second one orders. In customers I have a field named ID which is my primary key this is the customers id number. In orders I have a field ID which I want to be the foreign key. I have setup customers table with field ID and made primary key and auto inc. I also have a field in orders which is ID when I use phprunner I hilight orders table then go and under master select customers table then in primary key drop down ID field. Then under detail foreign key I select ID field from the orders table. What I want is to auto-increment the ID field in customers which it does and be able to enter in the ID field in orders to reflect customers ID. When I add record in orders it does not let me enter ID it creates it's own ID number. I have play with it many times and I can get it to let me change ID if I go back and edit but this is a pain. I have setup other tables in databases same way whichs works great. How can I get this to work right. problem two I create the the supertop.php and superbottom.php and have place it in the include folder on the install machine but it does not have a header or footer after build. I also have place it in the include folder in the apache install on server where the files are and still no header and footer. When I check some of the php files I notice no reference to the supertop.php or superbottom.php in the include folder so no header and footer. Any help would be great so I can finish testing. Thank you

J
Jane 10/4/2006

Hello,
see my answers below:

  1. if you want to create one-to-many relationships between customers and orders table I recommend you to add new field (CustomerID, for example) to the Orders table and then use this field as forein key.

    Please have a look at the following article:

    http://www.xlinesoft.com/phprunner/docs/ma...elationship.htm
  2. there are no supertop.php and superbottom.php files in the PHPRunner3.1.

    Use header.php and footer.php instead of supertop.php and superbottom.php.

G
greghar author 10/5/2006

Hello,

see my answers below:

  1. if you want to create one-to-many relationships between customers and orders table I recommend you to add new field (CustomerID, for example) to the Orders table and then use this field as forein key.

    Please have a look at the following article:

    http://www.xlinesoft.com/phprunner/docs/ma...elationship.htm
  2. there are no supertop.php and superbottom.php files in the PHPRunner3.1.

    Use header.php and footer.php instead of supertop.php and superbottom.php.


Hi

Header.php and footer.php fixed the header and footer problems. Still shows supertop and superbottom at website may need to change. Still same problem with foreign key. I make the customerid field in the orders table the foreign key to the ID field in my customers table which is the primary key and auto increment. Still does not let me enter in the orders table customerid the number I would like. I need to enter the id number here of the customer for the order. If I play with this I have been able to go back then it will let me enter in the field after the fact. Not sure why this is. I setup and use many database this way and no problem. Help Thanks Greg

Alexey 10/6/2006

Greg,
I'm a quite confused with your messages.
Please send to support@xlinesoft.com a URL to your pages with the description of what and where do you enter and what's wrong there.
If you can not give me the URL send me your PHPRunner project file along with your database creation script for investigation.