Professional Web Applications Themes

Problem with arrays - Coldfusion - Advanced Techniques

Hi, In PHP, there is a function named "Array_Multisort". Is there the same function in ColdFusion ? If not, is it possible to sort 3 or more arrays from one ? For example, my first array is a list of names and the second contains the birthday of each person. I want to the two arrays on the names for the first time, and in a second time on the birthday. Can someone help me ?...

Sponsored Links
  1. #1

    Default Problem with arrays

    Hi,

    In PHP, there is a function named "Array_Multisort". Is there the same
    function in ColdFusion ? If not, is it possible to sort 3 or more arrays from
    one ? For example, my first array is a list of names and the second contains
    the birthday of each person. I want to the two arrays on the names for the
    first time, and in a second time on the birthday. Can someone help me ?


    Sponsored Links
    Fabrice Guest

  2. #2

    Default Re: Problem with arrays

    I've never actually done it, but the doentation says that you can use Query
    of Queries on things besides queries. You might be able to do one on an array.

    Originally posted by: Fabrice Aubry
    Hi,

    In PHP, there is a function named "Array_Multisort". Is there the same
    function in ColdFusion ? If not, is it possible to sort 3 or more arrays from
    one ? For example, my first array is a list of names and the second contains
    the birthday of each person. I want to the two arrays on the names for the
    first time, and in a second time on the birthday. Can someone help me ?




    Dan Guest

  3. #3

    Default Re: Problem with arrays

    >Originally posted by: Dan Bracuk 

    Where does it say that?
    mxstu Guest

  4. #4

    Default Re: Problem with arrays

    The books are at work right now, and I am not, but I believe it is, "Advanced
    Macromedia ColdFusion MX 7 Application Development ".
    (http://www.forta.com/books/0321292693/). I had to look in the index to find
    the Q of Q section. The example he gave was on a verity collection not an
    array. If you have the book, you can read the chapter and (assuming I am
    remembering the right book) and make your own interpretations. As I said
    earlier, I haven't actually tried it.

    Originally posted by: mxstu 

    Where does it say that?



    Dan Guest

  5. #5

    Default Re: Problem with arrays

    I don't have that book, but I've only heard of it working on query objects. I
    believe they can be different types of queries (ie. created by cfquery, or
    cfldap, etc..) but afaik they still have to be query objects. That would be
    pretty neat though if could you have a generic function that could be used to
    "query" different types of objects ;-)

    mxstu Guest

  6. #6

    Default Re: Problem with arrays

    Fabrice Aubry,

    Afaik, the CF ArraySort() function only works with single dimension arrays
    http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functa16.htm

    You might want to check over at www.cflib.org . They might have a pre-made
    UDF for sorting multi dimensional arrays. I'm pretty sure they have one for
    2-D arrays (at least) which could easily be modified to sort a 3-D array.

    HTH

    mxstu Guest

  7. #7

    Default Re: Problem with arrays

    Thanks a lot for this answers.
    I'm going to have a look to the QoQ and maybe the lists too.
    Have a nice day :)
    Fabrice Guest

  8. #8

    Default Re: Problem with arrays

    Wrong book. The actual book is Developing Cold Fusion MX Applications page 459.

    Originally posted by: Dan Bracuk
    The books are at work right now, and I am not, but I believe it is, "Advanced
    Macromedia ColdFusion MX 7 Application Development ".
    (http://www.forta.com/books/0321292693/). I had to look in the index to find
    the Q of Q section. The example he gave was on a verity collection not an
    array. If you have the book, you can read the chapter and (assuming I am
    remembering the right book) and make your own interpretations. As I said
    earlier, I haven't actually tried it.

    Originally posted by: mxstu 

    Where does it say that?





    Dan Guest

  9. #9

    Default Re: Problem with arrays

    What exactly does it say? Can you post a sample?
    mxstu Guest

Similar Threads

  1. #39426 [NEW]: problem wih __get ant multidimensional arrays
    By wmalota at php-art dot pl in forum PHP Bugs
    Replies: 1
    Last Post: November 8th, 01:25 PM
  2. Problem with IMAPTalk and arrays
    By jbermudes@gmail.com in forum PERL Modules
    Replies: 1
    Last Post: May 5th, 04:43 PM
  3. Problem appending arrays in shopping cart
    By Fnark! in forum PHP Development
    Replies: 6
    Last Post: July 20th, 09:56 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139