Retrieve n records from database

Ask a Question related to Macromedia Flash, Design and Development.

  1. #1

    Default Retrieve n records from database

    I came across a tutorial about a year ago that explained the answer I seek.
    Now, however, I cannot find the answer anywhere.

    I have a flash movie that takes some data in a couple of input fields...
    then does a loadVariablesNum("script.pl", 0,"POST"); call

    My script.pl file returns something like this...
    &n=10&company1=Macromedia&address1=22845 Main
    Dr.&zip1=99399&company2=Microsoft&address2=33 Big Rd.&zip2=12345.... all the
    way to zip10=00299

    My question is this...
    How do I do the following:
    for (i = 1, i <= n, i++) {
    text + i = (company + i) + " " + (address + i) + " " + (zip + i);
    }

    so that (text + i) translates to text1...text10 (and company + i) translates
    to company1...company10 etc???

    I know I have seen the answer, but I cannot for the life of me figure it
    out.

    Any help is greatfully appreciated.


    Sean Berry Guest

  2. Similar Questions and Discussions

    1. how to retrieve swf file from database?
      i m still new in this actionscript thingy. i know how to load external .swf file from the same folder to flash when it is call by using ...
    2. retrieve sql from database
      Our organization has alot of SQL, and we prefer to be able to store our application SQL in a DB; we find it easier to maintain that way. What I...
    3. Two Function Calls to a Database to Retrieve the UniqueID of Inserted Records
      Hi guys, I got the error message on Option 2 query as show. Actually, this code is from Inside ColdFusion MX boook. I just would like to know is...
    4. How to retrieve the records if I have .SQL script file using ADO.net
      Hi, I need to retrieve records from SQL 2000 datbase using ADO.Net I have a huge select statement in .sql script file I need to run it to get the...
    5. Need to retrieve records
      In the recordset that retrieves the data, add the form variable that the user is inputting as a filter. -- Mike ------------------- Michael...
  3. #2

    Default Re: Retrieve n records from database

    > I have a flash movie that takes some data in a couple of input fields...
    > then does a loadVariablesNum("script.pl", 0,"POST"); call
    >
    > My script.pl file returns something like this...
    > &n=10&company1=Macromedia&address1=22845 Main
    > Dr.&zip1=99399&company2=Microsoft&address2=33 Big Rd.&zip2=12345.... all
    > the way to zip10=00299
    >
    > My question is this...
    > How do I do the following:
    > for (i = 1, i <= n, i++) {
    > text + i = (company + i) + " " + (address + i) + " " + (zip + i);
    > }
    >
    > so that (text + i) translates to text1...text10 (and company + i)
    > translates to company1...company10 etc???
    >
    > I know I have seen the answer, but I cannot for the life of me figure it
    > out.
    >
    After trying for over an hour, then posting this message, I figured it out
    10 minutes later.

    I would use
    this["text"+i] = this["company"+i] + " " + this["address"+i] + " " +
    this["zip"+i];

    Thanks anyway... hope this helps someone someday.


    Sean Berry Guest

Posting Permissions

  • You may not post new threads
  • You may 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