Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 29. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Filter values for a column with 'sql' option set (PME 5.7.1)

phpMyEdit Features     Filter values for a column with 'sql' option set (PME 5.7.1)
Odoslať novú tému   Odpovedať na tému    
 
lsuardi     Založený: 24.09.2008   Príspevky: 1  
Príspevok Zaslal: 2008-09-24 10:39
Návrat hore  Odpovedať s citátom     

I could not find a way to control the filter values for a column that has the 'sql' option set. Please let me know if there is one.

In the meantime I have modified the set_values_from_table() to set filter values based on a new column attribute 'fvalues'. See below.

Kód:

...
      }
      
      // lsuardi - use special field attribute 'fvalues' to
      // set filter values using a specific query or array of values
      
      else if ( is_array( $this->fdd[$field_num]['fvalues']) )
      { return( $this->fdd[$field_num]['fvalues']);
      }
      else if ( isset( $this->fdd[$field_num]['fvalues']) )
      { $values = array();
        $res    = $this->myquery( $this->fdd[$field_num]['fvalues'], __LINE__);
        while ($row = $this->sql_fetch($res, 'n'))
           $values[$row[0]] = $row[0];
        return $values;
      }
      
      else { /* simple value extraction */
...


Please let me know if this is a good solution and if you are interested in incorporating the code in PME.
Thank you!

 
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