We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16211
    • 3 Posts
    How would I do the following in xPDO?
    SELECT *, COUNT(*) matched
    FROM products  
    LEFT JOIN products_category
    ON (products_category.products_id = products.id)
    WHERE (products_category.category_id=80 OR products_category.category_id=98)
    GROUP BY products_id 
    HAVING matched = 2;
      • 16211
      • 3 Posts
      any one here?
        • 6228
        • 249 Posts
        I think if you have a more specific question, I and others can be far more helpful. But such a generic question is difficult to answer because it isn’t know to what extent your familiarity with xPDO is.

        Do you already have a separate xPDO instance for your custom tables? Do you just want to use straight SQL rather than the xPDO methods that are available for building queries? Do you want to use xPDO methods and would like to do it the right way - with a database schema and model? I’m assuming you just ’want it to work’, but unfortunately working with xPDO does require learning some fundamentals since the entire MODx [Revolution] system is based on it.

        Here’s a good place to get yourself familiarized with xPDO:

        http://rtfm.modx.com/display/xPDO20/Home
          lo9on.com

          MODx Evolution/Revolution | Remote Desktop Training | Development