We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18366
    • 14 Posts
    This is a handy parameter to ditto where you can give it a comma separated list of document ids to retrieve. The problem I’m having is that regardless of the order I specify the various ids ditto always outputs them in the same order and I’m not using any order by clause. Does anyone know how to stop it ordering the results and just fetch in the order of the comma separated list? Thanks.
      • 2740
      • 95 Posts
        • 18366
        • 14 Posts
        Problem solved, thanks.

        One improvement to the solution in that thread is that you don’t need to specify the parents parameter if using the documents parameter.

        If I hadn’t found this I was going to use the php explode function to parse the comma separated list into an array, then iterate through the array concatenating the output from separate ditto calls for just one document id each time, then outputing the whole lot. Obviously not as good as this.

        That ditto dude must have been pretty clever.