We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27733
    • 99 Posts
    Will do. I’ll submit the proposed code change as well. Cheers!
      ------
      Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.
      • 27733
      • 99 Posts
      Shaun,
      I forked your project (smg6511) and made the changes to add the param "returnJSON" there. Take a look ...
      Jim
        ------
        Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.
        • 14162
        • 67 Posts
        I have a problem with the Where JSON query format.

        I’m trying to do the following:
        &where=`{"theme:LIKE":"%theme1%","OR:theme:LIKE":"%theme2%","OR:theme:LIKE":"%theme3%"}`

        But I get the SQL query:
        SELECT * FROM `library_news`
        WHERE `theme` LIKE "%theme1%" OR `theme` LIKE "%theme1%"theme4dc934a911170

        Complete nonsense. The where query works fine with different columns:
        &where=`{"theme:LIKE":"%theme1%","OR:type:LIKE":"%type1%","OR:class:LIKE":"%class1%"}`

        but I can’t get it to work querying the same column.

        Any help much appreciated.

        PS: If it’s better to use IN instead of LIKE in this case, can/how do I use an Array of values in the Rowboat snippet call?
          • 28743
          • 10 Posts
          Is there any way to add multiple fields to sort by? Tried a couple of ways, eg &sortBy=`"periods, length"` but it ends up with ORDER BY `periodslength` in the query.

          Cheers!
            • 34120
            • 236 Posts
            I’m using rowboat to build a navigation, pulling categories from a database. I need to add an active class to the currently selected navigation link eg.
            <li class="active">
            I’d normally do this with wayfinder, any ideas how I would go about this? I’m wondering if rowboat would work with wayfinder or maybe there’s a simpler solution I’m missing.

            Thanks

            edit: just looking into this, could maybe do it with getPage?
              • 19555
              • 1 Posts
              [[!getPage?
                 &element=`Rowboat`
                 &table=`modx_property_detail`
                 &sortBy=`id`
                 &totalVar=`rowboat.total`
                 &tpl=`chunk_property_detail`
                 &cache=`0`
                &debug=`1`
                 &limit=`'.$display.'`
                 &where=`{"active":"yes","salary":"1000"]]
              

              now my question is how can i use operators in where condition salary like "salary>1000" or "salary<1000" something like that
              thanks for your time !
                • 19252
                • 9 Posts
                I am using Rowboat to generate a glossary page. When debugging is turned on, it shows the DB working properly. it is not pulling it into the template called - all I get is a blank results when debugging is turned off. Here is the snippet call:

                [[!Rowboat?
                &table=`modx_site_glossary`
                &tpl=`tpl-glossary-list`
                &limit=`300`
                &sortBy=`term`
                &debug=`0`
                ]]

                template call:
                <dl class="glossary" id="glossary-[[+id]]">
                <dt>[[+term]]</dt>
                <dd>[[+definition]]</dd>
                </dl>

                Any ideas why no results are not being fed into the template? Any help is much appreciated.
                  • 5021
                  • 2 Posts
                  Do you plan to provide some opportunities for the expanded output of information? I mean the possibility of merging some of the rows with "rowspan". I have a table derived from related tables that have fields with duplicate values​​.
                    • 34004
                    • 125 Posts
                    A long shot, but is there a way to use rowboat to read from another database on the same server? Otherwise I'll create a snippet but thought I'd ask!
                      • 21075
                      • 24 Posts
                      Hey guys. I could use a little help here. Is there a way to get Rowboat to return only distinct fields? Basically, to run a SELECT DISTINCT query instead of just SELECT?