Retrieve URL from DB

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

  1. #1

    Default Retrieve URL from DB

    Does anyone know how to pull a URL from a DB?

    Here's my example:

    I have a database with training records in it. Inside the DB people fall under
    group 1, 2, 3, or 4. Each of these groups has a Master trainer. I want to
    create an account for each Master Trainer. Say Master Trainer1, Master Trainer
    2, etc. Also in this DB i have a column called URL. For all members it is blank
    and they will just view there records. For Master Trainers I want to create an
    if statement that says if they login, go to the URL in the DB.

    This will be on my validate.cfm

    <cfif '#form.username#' = "Master Trainer1">
    statement to pull URL from DB

    <else>
    go to the users records
    </cfif>

    Please Help!

    coryd218 Guest

  2. Similar Questions and Discussions

    1. 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...
    2. Retrieve User Name in C#.net
      Hi All, I am trying to find how to retrieve the user name using .Net. I know how to retrieve the user login using...
    3. Cannot retrieve data in utf-8 from php
      Hi. I have a IIS server with php3 installed. I have SQL server database and data stored in unicode format (nvarchar fields). In header of my php...
    4. retrieve *.jpg
      How can I enter a upc # and retrieve a *.jpg image based on the upc I enter. I have thousands of images, so I cannot use a query and insert a...
    5. retrieve value from xml using id field
      I solved it myself.. Sorry. Solution was: Dim xpathDoc As XPathDocument Dim xmlNav As XPathNavigator Dim xmlNI As XPathNodeIterator xpathDoc...
  3. #2

    Default Re: Retrieve URL from DB

    <cfif '#form.username#' = "Master Trainer1">
    <cfquery name="qGetUrl" datasource="#datasource#">
    select url from db_name
    where user_name = '#form.username#'
    </cfquery>
    <cflocation url="#qGetUrl.url#">
    <else>
    go to the users records
    </cfif>


    adonis1976 Guest

  4. #3

    Default Re: Retrieve URL from DB

    AWESOME! Thanks.
    coryd218 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