This topic is locked

need help on table links

10/20/2011 3:47:44 AM
PHPRunner General questions
B
Brandje author

Ive been searching this forum, but I cant seem to find a solution for my problem, and as my php skils are very limited I was hoping phprunner could solve my problems.
I have created 3 tables:
-users

-garages

-cars
users and garages both have the user id on which I linked them, and garages, and cars are linked by garage ID.
Now the plan was for users to setup one or more garages, and fill them with cars, this works if i browse trough the menus, if i start on the user level, create a garage, and then add cars, so far so good.
but here's my problem: if I go directly to cars, I can add cars, and it just adds them without a garage ID, on that point I need to get an error, where it says either create a garage first, or select your garage.
Again, I am a newbie to php programming, so any help would be appreciated.
Thanks in advance.

C
cgphp 10/20/2011

If garages and cars are linked by a GarageID, set this field as lookup wizard in the "Add car" page, so you can select a garage from a dropdown.