We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    Quote from: garryn at Jan 25, 2006, 10:04 PM

    I’ll have a proper crawl over all the code tomorrow and get a new version uploaded. I need to reassess the way I’m counting records returned via the modX->db->select() as I don’t think my way is working!

    Gary, instead of...
      $rs = $modx->db->select("*",$polltable,$where,"id ASC","");
      $limit = count($rs);
      if($limit > 0){
        $fields = $modx->db->getRow($rs);
      }
    

    try something like...
      $rs = $modx->db->select("*",$polltable,$where,"id ASC","");
      $limit = $modx->db->getRecordCount($rs);
      if($limit > 0){
        $fields = $modx->db->getRow($rs);
      }
    
      • 10487 MODX Staff
      • 1,535 Posts
      Thanks Jason, just what I was looking for! I’ll include that in my next update. smiley
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 32241
        • 1,495 Posts
        Garryn, nice snippet/module. Thinking to make this template based snippet? So that we can expand the templating, which I believe will be a great addition to the new version. Keep it up wink
          Wendy Novianto
          [font=Verdana]PT DJAMOER Technology Media
          [font=Verdana]Xituz Media
          • 2762
          • 1,198 Posts
          Oh yes!! really needed snippet for community sites! Thanks for sharing!! wink
            Free MODx Graphic resources and Templates www.tattoocms.it
            -----------------------------------------------------

            MODx IT  www.modx.it
            -----------------------------------------------------

            bubuna.com - Web & Multimedia Design
            • 6726
            • 7,075 Posts
            Quote from: garryn at Jan 25, 2006, 07:28 PM
            * 26/01/06: New zip uploaded containing bug fixes for both snippets relating to the display of choices.

            Cool, I’ll have a use for it soon, really nice having this module !
            I’ll go and test it smiley

            Thanks !
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 18397
              • 3,250 Posts
              Also,
              
                for($i=0; $i<=$limit2; $i++) {
              
              


              should be this

                for($i=0; $i<$limit2; $i++) {
              
                • 18397
                • 3,250 Posts
                Ok, Garry I made the changes everyone spoke of in this thread and here are the 2 corrected files:
                  • 10487 MODX Staff
                  • 1,535 Posts
                  Thanks for everyone for the feedback and suggestions! It’s all a learning curve for me at the minute so really appreciate the comments.

                  Thanks Mark for making those changes, I’ve been having hell of a day at work and just not had chance to have a look at it yet. smiley

                  I’m going to work on the manager module later today to implement a few bug fixes so will upload the new info as soon as it’s ready.

                  Cheers, Garry

                    Garry Nutting
                    Senior Developer
                    MODX, LLC

                    Email: [email protected]
                    Twitter: @garryn
                    Web: modx.com
                    • 7455
                    • 2,204 Posts
                    Any demo url?
                      follow me on twitter: @dimmy01
                      • 10487 MODX Staff
                      • 1,535 Posts
                      I’ve set my demo url up at: http://www.immerse.me.uk/index.php?id=4

                      When you vote, it redirects to another page to show the results. Of course, if you wished, you could have both snippets on the same page.

                      Has anybody tried this with FURLs at all? (and does it work ...) I’m struggling to get FURLs up and running on my site at the moment so I can’t test myself.

                      Cheers, Garry
                        Garry Nutting
                        Senior Developer
                        MODX, LLC

                        Email: [email protected]
                        Twitter: @garryn
                        Web: modx.com

                      This discussion is closed to further replies. Keep calm and carry on.