Sorry that's meant to say use or instead of and in the query.

Paul

On 8/9/09, Paul Kukiel <[email protected]> wrote:
> Use or instead or and in the query.
>
> Paul
>
> On 8/9/09, John  Barrett <[email protected]> wrote:
>>
>> I am trying to make a dynamic navigation.
>> I have a database(MySQL) table called "Navigation" for my CF data source.
>> the format is:
>> record_id text URL category
>>
>> in my navigation I want to display two categories at once. There is
>> global,
>> and lets say Health. If I want to display them on the same page at once,
>> how
>> can I do this?
>>
>> I thought that using AND with the WHERE clause would work, but does not.
>>
>> THIS WORKS FINE:
>> <cfquery name="Navigation"  datasource="#REQUEST.dataSource#">
>>   Select *
>>   FROM navigation
>>   WHERE Category ="Global"
>> </cfquery>
>>
>>  <table border="0">
>>       <cfoutput query="Navigation">
>>         <tr>
>>           <td><a href="#Navigation.URL#">#Navigation.Text#</a></td>
>>         </tr>
>>       </cfoutput>
>>     </table>
>>
>> You can see this at:
>> http://gotnutrients.net/FoodSystems/url_test.cfm
>>
>> This works for one category, but if I want to display both Global &
>> Health
>> is where things break.
>> I was thinking that I could use:
>>  WHERE Category ="Global" AND Catagory ="Health"
>>
>> Any help here would be great!
>> By the way is this a good way to make a dynamic navigation system?
>>
>> Thanks so much,
>> John
>>
>> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4689
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to