Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Drop down from other tables

phpMyEdit General     Drop down from other tables
Odoslať novú tému   Odpovedať na tému    
 
gimbus109     Založený: 31.07.2004   Príspevky: 6   Bydlisko: poland
Príspevok Zaslal: 2004-09-01 14:07
Návrat hore  Odpovedať s citátom     

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:
Kód:

$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     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-09-02 17:04
Návrat hore  Odpovedať s citátom     

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     Založený: 31.07.2004   Príspevky: 6   Bydlisko: poland
Príspevok Zaslal: 2004-09-03 16:41
Návrat hore  Odpovedať s citátom     

I will try to do that in the two-step way.
Thanks
Pawel

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov