| Index
» Projects
» phpMyEdit
» Forum
» Drop down from other tables |
 |
gimbus109
Joined: 31 Jul 2004
Posts: 6
Location: poland
Posted: 2004-09-01 14:07
Back to top
Reply with quote
|
Hi everybody!
I'm playing with phpMyEdit for some time and I find it great!
I'm trying to solve a problem and cannot find anything in the forum.
I have 3 tables:
Customers:
c_id
name
some more fields......
Vehicles:
v_id
c_id from table customers
VIN
NRREJ
some more fields.....
Maintenance
no
c_id
v_id
some more fields.....
There is a relation 1 customer -> many vehicles
I have a maintenence grid like this:
| Code: |
$opts['fdd']['nr'] = array(
'name' => 'No',
'options' => 'AVCPDR' // auto increment
);
$opts['fdd']['custid'] = array(
'name' => 'Klient',
'values' => array(
'table' => 'customer',
'column' => 'c_id',
'description' => array(
'columns' => array(
'0' => 'name',
'1' => 'city'
),
'divs' => array(
'0' => ', ',
)
)
)
);
$opts['fdd']['vehicle'] = array(
'name' => 'Auto',
'values' => array(
'table' => 'vehicles',
'column' => 'v_id',
'description' => array(
'columns' => array(
'0' => 'nrrej',
'1' => 'VIN'
),
'divs' => array(
'0' => ', '
)
)
)
);
|
Is it posible - while ADD/CHANGE - that after user selects a customer from dropdown list, the second dropdown list (with vehicles) shows only his vehicles? Or should it be done using 2 forms?
I tried filters, sql - nothing works.
Regards
Pawel
|
michal
Joined: 17 Jun 2003
Posts: 537
Location: Slovakia
Posted: 2004-09-02 17:04
Back to top
Reply with quote
|
with current pme, it's not doable as described.
some possible solution is here http://opensource.platon.sk/forum/projects/viewtopic.php?t=446
another could be done with a kind of wizard. first step to choose customer, 2nd choose car (of that customer) (with classic values with filters obtained from $_POST/).
|
gimbus109
Joined: 31 Jul 2004
Posts: 6
Location: poland
Posted: 2004-09-03 16:41
Back to top
Reply with quote
|
I will try to do that in the two-step way.
Thanks
Pawel
|
|
Post new topic
Reply to topic
|
|
|
|