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  »  Filters in Values

phpMyEdit General     Filters in Values
Odoslať novú tému   Odpovedať na tému    
 
aslan     Založený: 22.05.2004   Príspevky: 5  
Príspevok Zaslal: 2004-05-22 18:37
Návrat hore  Odpovedať s citátom     

Did a quick search and didn't see anything that pointed me in the right direction. I have a table that houses labels for data. Example:
ID Name Group
1 Test 1
2 Lava 2
3 Hot 1

I want to only show those in group one in the pulldown menu for active so I tried putting a filter attribute in there. Not sure if there s anyway to do this or if I have to scrap using myEdit for these projects.

Thanks
A
Kód:
$opts['fdd']['active'] = array(
  'name'     => 'Active/Passive',
  'select'   => 'D',
  'maxlen'   => 4,
  'default'  => '3',
  'required' => true,
  'sort'     => true,
  'values' => array(
      'table'       => 'tbl_labels',
      'column'      => 'label_id',
      'description' => 'label_name',
     'filter'       => 'where label_group = 2')
);


 
aslan     Založený: 22.05.2004   Príspevky: 5  
Príspevok Zaslal: 2004-05-22 21:46
Návrat hore  Odpovedať s citátom     

Doesn't work either.

I'm wondering if you can use filters to affect the values for a select statement or not.

 
aslan     Založený: 22.05.2004   Príspevky: 5  
Príspevok Zaslal: 2004-05-23 14:57
Návrat hore  Odpovedať s citátom     

Thanks for the response.

Gave it a try and it still doesn't work though :|

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-05-23 20:38
Návrat hore  Odpovedať s citátom     

try 'filters' not 'filter', that should work (without where)

 
aslan     Založený: 22.05.2004   Príspevky: 5  
Príspevok Zaslal: 2004-05-24 03:12
Návrat hore  Odpovedať s citátom     

That sure fixed it, that is Awesome you are going to save me a TON of time. Thanks!

 
debi     Založený: 05.08.2005   Príspevky: 1  
Príspevok Zaslal: 2005-08-05 06:47
Návrat hore  Odpovedať s citátom     

Hi there,

This is just what I'm looking for except I'd like to replace the value "2" to with $value, and I can't get it to work. The value to pass on when you click on 'add', so the filter has no value... Is there a way around?

'values' => array(
'table' => 'tbl_labels',
'column' => 'label_id',
'description' => 'label_name',
'filter' => 'label_group = "2" ')


Thanks,

Debi

ps (added since original post) - this is probably a really bad fix but it kinda works: I've set the value as a cookie, with a meta tag refresh. It's a bit clunky but it works.

 
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