| Index
» Projects
» phpMyEdit
» Forum
» Filters in Values |
 |
aslan
Joined: 22 May 2004
Posts: 5
Posted: 2004-05-22 18:37
Back to top
Reply with quote
|
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
| Code: |
$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
Joined: 22 May 2004
Posts: 5
Posted: 2004-05-22 21:46
Back to top
Reply with quote
|
Doesn't work either.
I'm wondering if you can use filters to affect the values for a select statement or not.
|
aslan
Joined: 22 May 2004
Posts: 5
Posted: 2004-05-23 14:57
Back to top
Reply with quote
|
Thanks for the response.
Gave it a try and it still doesn't work though :|
|
michal
Joined: 17 Jun 2003
Posts: 537
Location: Slovakia
Posted: 2004-05-23 20:38
Back to top
Reply with quote
|
try 'filters' not 'filter', that should work (without where)
|
aslan
Joined: 22 May 2004
Posts: 5
Posted: 2004-05-24 03:12
Back to top
Reply with quote
|
That sure fixed it, that is Awesome you are going to save me a TON of time. Thanks!
|
debi
Joined: 05 Aug 2005
Posts: 1
Posted: 2005-08-05 06:47
Back to top
Reply with quote
|
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.
|
|
Post new topic
Reply to topic
|
|
|
|