This topic is locked

Master Detail

9/11/2005 12:45:05 PM
PHPRunner General questions
author

Hi,
Neat poduct, exactly what I am looking for. Can't seem to figure it out though.
My first project is a simple form. I want to edit the details only, but display the name from a master table.
I tried the master detail setup and entered all the info, keys, etc. but never saw the master info on the published page and the sql query showed no master info either.
So I put in the custom query:
select profile_master.company_name , yards.yard, yards.customReplyMessage From yards , profile_master WHERE yards.yard = profile_master.user_id
When I publish it and try it, I get a PHP sql error on the query - the program has appended 'yard' to the query:
Error type 256

Error description You have an error in your SQL syntax near 'yard' at line 1

URL redhat/Output/yards_list.php

Error file /mnt/dell/linux/Com-Search/Web Site/Output/include/dbconnection.php

Error line 26

SQL query select profile_master.company_name , yards.yard, yards.customReplyMessage From yards , profile_master WHERE yards.yard = profile_master.user_id yard
What basic concept am I missing? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=1843&image=1&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />
Tia

501253 9/11/2005

Ok - that was pretty stupid. I eventually figured out that I had just typed a column name into the "orders by" box mangling the query.
It works now.
Next question - how can I validate that the parent record exists before I allow a new detail to be added. I put in the key relationship but it seems to allow orphan details to be created.