Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Erik 10 posts 31 karma points
    May 17, 2018 @ 14:30
    Erik
    0

    Filter Category by OR filter.

    Hi.

    I have a problem with a project that we are developing. In short I have to filter the collection like this. Show me all items that are in a collection and show me the items in the same collection that have an attribute,

    // SQL Query MOCK

    SELECT * FROM Products WHERE ItemCollection = 'id' or( FIlter1 = 1 or Filter2 = 2) DISTINCT

    Is this possible with the appies? I know of the property Clusivity on the Query object, But None off the options are ok.

    There should be a query.AddConstraint(new ProductFilter(Guid[] _filters, Opradnd.[AND|OR]);

    Merchello Version 2.6.0

    Thank you!

  • pranjal 75 posts 186 karma points
    May 28, 2018 @ 12:59
    pranjal
    0

    you are applying wrong sql query'

    just follow this syntax for sql query and you will get proper results.

        // Query to get BMI results for Specific user using Umbraco Sql Query
            var query = new Sql().Select("CalculatedOn,Result").From("cmsHealthAnalysisTool").Where("MemberId=@0 and ToolType=@1", id, type); 
            return _db.Fetch<HealthDataModel>(query);
    

    Use sql queries in umbraco like this and don't forget to add namespace namespace Umbraco.Core.Persistence

  • Erik 10 posts 31 karma points
    May 30, 2018 @ 18:38
    Erik
    0

    Thanks for the replay, but the question was ment for merchello web shop Entity Collection. My query was only an example.. Regards.

Please Sign in or register to post replies

Write your reply to:

Draft