Set new variable name.

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Set new variable name.

    I've got two tables: one called issue and one called regionmail.
    On table issue, i've got a collomn called SPARPROD. with only does have values
    of "Products" or "SPARES.

    On table regionmail, there are two collomns, one called "Products" and one
    called "Spares", both collomns do have
    different values.

    I do need to get the value from Table Issue, collomn SPARPROD. ( this could
    be either Products or Spares).
    With should be placed in a new variable name( A none existing one of both
    table quiries), with should call from table Regionmail , either the colloumn
    Products or Spares.
    ( this depends on the value picked out of the collumn SPARPROD from table
    issue)


    Thanks in advanced

    whatsaname Guest

  2. Similar Questions and Discussions

    1. #39634 [NEW]: session variable and normal variable
      From: erhanbaris at gmail dot com Operating system: Win Xp SP1 PHP version: 5.2.0 PHP Bug Type: Variables related Bug...
    2. #39251 [NEW]: variable variable class array property is read only
      From: taskfreak at gmail dot com Operating system: mac os PHP version: 5.1.6 PHP Bug Type: Class/Object related Bug...
    3. #22237 [Com]: PHP crashes when class references property using variable variable
      ID: 22237 Comment by: rep at devdomain dot com Reported By: peter at globalvision dot com dot au Status: Closed...
    4. passing javascript variable into asp variable using vbscript
      The subject pretty much sums up what I need to do. Here is what I have so far, but still can't figure out how to get it working: <script...
    5. Datalist - how (if) to use a sub variable or session variable in the footer?
      Hi, sorry to be greedy with all my posts lately, but can you tell I'm doing new things this week? I've just done my first datalist (a simple...
  3. #2

    Default Re: Set new variable name.

    You did not specify the relationship between the tables, i.e. is there one
    regionmail per sparprod? Anyway, you should try it with a UNION
    That is, if products and spares are of the same type. I also assumed there is
    a foreign key relationship between the tables:
    ************************************************** **********
    select i.iid, products from issue i, regionmail r
    where r.iid=i.iid
    and i.SPARPROD = 'products'
    union
    select i.iid, spares from issue i, regionmail r
    where r.iid=i.iid
    and i.SPARPROD = 'spares'

    yalta 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