 | |  |
 |

rasbro
User
Apr 24, 2008, 4:15 PM
Post #1 of 3
(126 views)
Shortcut
|
|
Syntax Help (more than one criteria in $options['where'] line)
|
Can't Post
|
|
I can't get this to work. I want to be able to assign articles to more than one topic or section. To do this I have 3 drop down lists that allow me to choose which default topic or other additional topics the article will appear. So far I am doing it this way and have tried both versions: $options['where'] = 'default_topic = "Grilling Tips"'; 'other_topic1 = "Grilling Tips"'; 'other_topic2 = "Grilling Tips"'; $options['where'] = "default_topic = 'Grilling Tips'"; "other_topic1 = 'Grilling Tips'"; "other_topic2 = 'Grilling Tips'"; The article shows up when the "default_topic" drop down is selected but not when I choose the "other_topic1" or "other_topic2" drop down selection for the article. So, unless the article is assigned to the "default_topic" selection, it does not show up. Any ideas? I have tried other syntax, like separating the options with a comma or other ways but always get a syntax error. Thanks, Brian
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 24, 2008, 5:00 PM
Post #2 of 3
(123 views)
Shortcut
|
|
Re: [rasbro] Syntax Help (more than one criteria in $options['where'] line)
[In reply to]
|
Can't Post
|
|
So you want a where that matches any of the 3? Is that right? Try this: $options['where'] = 'default_topic = "Grilling Tips" OR other_topic1 = "Grilling Tips" OR other_topic2 = "Grilling Tips"'; Let me know if that works for you. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

rasbro
User
Apr 24, 2008, 8:42 PM
Post #3 of 3
(121 views)
Shortcut
|
|
Re: [Dave] Syntax Help (more than one criteria in $options['where'] line)
[In reply to]
|
Can't Post
|
|
Yep, that's what I need Dave. I tried it and it seems to work. Thanks! Brian
|
|
|  |
|