Help with URL in database

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

  1. #1

    Default Help with URL in database

    I'm new to databases and CF, so this is probably a no brainer. When my page
    displays and I try to click on the List# or Property the url that is displayed
    has "extra" stuff in it.

    [url]http://www.pinnaclespokane.com/test.cfm#http://www.pinnaclespokane.com/propertie[/url]
    s/washington/lease/spokane/10604e16th/10604e16th2.htm#
    the first http URL and the beginning and ending # signs are what I need to get
    rid of.
    I tried changing:<a href=#URL#>#LISTING.LISTNUM#</a> to <a
    href=#LISTING.URL#>#LISTING.LISTNUM#</a> and that didn't work
    Can anyone help me with this please?

    <cfquery DBTYPE="dynamic"
    connectstring="Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\Program
    Files\Ensim\Sitedata\pinnaclespokane\InetPub\wwwro ot\listings.mdb;Uid=username;P
    wd=pass;" name="listing">
    SELECT LISTNUM, PROPERTY, LANDSF, BLDGSF, PRICE, DOLLPERSF, AGENT, URL
    FROM LISTINGS
    </cfquery>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD><TITLE>LIST#</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=windows-1252">
    <META content="MSHTML 6.00.2900.2627" name=GENERATOR></HEAD>
    <BODY lang=EN-US vLink=#800080 link=#0000ff bgColor=#ffef00>
    <TABLE cellSpacing=0 cellPadding=0 width=550 border=1>
    <TBODY>
    <TR>
    <TD width=550>
    <TABLE cellSpacing=0 cellPadding=0 border=1>
    <TBODY>
    <TR>
    <TD width=45> <P style="TEXT-ALIGN: center"
    align=center><B>LIST#</B></P></TD>
    <TD width=255> <P style="TEXT-ALIGN: center"
    align=center><B>PROPERTY</B></P></TD>
    <TD width=55> <P style="TEXT-ALIGN: center"
    align=center><B>LAND<BR>
    SQFT</B></P></TD>
    <TD width=55> <P style="TEXT-ALIGN: center"
    align=center><B>BLDG<BR>
    SQFT</B></P></TD>
    <TD width="85"> <P style="TEXT-ALIGN: center"
    align=center><B>PRICE</B></P></TD>
    <TD width=45> <P style="TEXT-ALIGN: center"
    align=center><B>$/SF</B></P></TD>
    <TD width="50"> <P style="TEXT-ALIGN: center"
    align=center><B>AGENT</B></P></TD>
    </TR>
    <cfoutput query="listing">
    <TR>
    <TD align=center width=45><a
    href=#URL#>#LISTING.LISTNUM#</a></TD>
    <TD width=255><a href=#URL#>#LISTING.PROPERTY#</a></TD>
    <TD align=middle width=55>#LISTING.LANDSF#</TD>
    <TD align=middle width=55>#LISTING.BLDGSF#</TD>
    <TD align=right width=85>#LISTING.PRICE#</TD>
    <TD align=right width=45>#LISTING.DOLLPERSF#</TD>
    <TD align=center width=50>#LISTING.AGENT#</TD>
    </TR>
    </cfoutput>
    </TBODY>
    </TABLE>
    </TD></TR>
    <TR>
    <TD width="100%">
    <P><SPAN style="FONT-SIZE: 6pt; FONT-FAMILY: Arial">NO WARRANTY OR
    REPRESENTATION, EXPRESS OR IMPLIED IS MADE BY PINNACLE REALTY, INC.,
    IT?S
    AGENTS OR IT?S EMPLOYEES<SPAN class=GramE>&nbsp; OR</SPAN> MSW GRAPHICS
    AS
    TO THE ACCURACY OF THE INFORMATION CONTAINED HEREIN.&nbsp; THE SAME IS
    SUBMITTED SUBJECT TO ERRORS, OMMISSIONS, CHANGE OF PRICE, OR WITHDRAWAL
    WITHOUT NOTICE AND ANY SPECIAL LISTING CONDITIONS IMPOSED BY OUR
    PRINCIPALS.&nbsp; NO ONE SHOULD RELY ON THE ABOVE INFORMATION, BUT
    INSTEAD
    SHOULD CONDUCT THEIR OWN INVESTIGATION TO INDEPENDENTLY SATISIFY
    THEMSELVES.</SPAN></P></TD></TR></TBODY></TABLE></BODY></HTML>

    prpldude Guest

  2. Similar Questions and Discussions

    1. MySQL Database not retrieving the full database
      Hi, I am using MySQL and PHP for my repository. It has 500+ records. till now it was displayiing all records in the database, but since from one...
    2. Import Data from flat-database to relational-database
      Before I start I need some tips and pleas excuse my bad english. I have two databases, one is flat and one is a relational database. example ...
    3. NEWBIE HELP Import Data from flat-database to relational-database
      I want to import Data from a simple Database, which contains all Information in one big record into a relational Database and split up the big...
    4. Passing database info to page allow user input then pass into another database
      Hi I really am going crazy! I'm using VBScript, ASP, and SQL My page reminds me of a shopping cart but looking at shopping cart examples has not...
    5. Another user has modified the contents of this table or view; the database row you are modifying no longer exists in the database;
      Hi, I am testing a trigger that and I am getting this error message saying "Another user has modified the contents of this table or view; the...
  3. #2

    Default Re: Help with URL in database

    Did you try enclosing the href attribute in quotes:


    <a href="#URL#">...

    Also, what's in the raw output for URL and LISTING? Could you show that to us also?


    philh Guest

  4. #3

    Default Re: Help with URL in database

    You did not mention the CF version you are using.

    While the prior suggestion to enclose your <a href="#columnname#"> in quotes
    is correct, you may also want to be aware that
    URL is a reserved word in CF MX or later. You may need to tweak your query to
    return a different name for the column.

    SELECT URL as myURL ...

    Hope this helps.
    - Gary

    umms_gary Guest

  5. #4

    Default Re: Help with URL in database

    Philh Thanks for the suggestion. What do you mean by "raw output"?
    Gary I am using CF MX 7. I changed the column name to MYURL and changed the
    SELECT tag to reflect this and then changed the code to:
    <TD align=center width=45><a
    href="#MYURL#">#LISTING.LISTNUM#</a></TD>
    <TD width=280><a href="#MYURL#">#LISTING.PROPERTY#</a></TD>
    This did not seem to help.
    I have a test page at [url]www.pinnaclespokane.com/litstings.cfm[/url]

    Thanks again for all the help and suggestions,
    Marc


    prpldude Guest

  6. #5

    Default Re: Help with URL in database

    that url is suppose to be:
    [url]http://www.pinnaclespokane.com/listings.cfm[/url]
    prpldude Guest

  7. #6

    Default Re: Help with URL in database

    The only thing I can think of is that you have a pound sign in the URL field.

    What I mean by raw output is that you should just run a CFOUTPUT with just
    the field values (no HTML) to see what is returned to the browser.

    philh Guest

  8. #7

    Default Re: Help with URL in database

    I checked the url in the database and there are no # signs in the url so, I
    took out the href and just output the #MYURL# and in the browser I got the same
    result as before.

    #[url]http://www.pinnaclespokane.com/properties/washington/lease/spokane/10604e16th/1[/url]
    0604e16th2.htm#

    Thanks again for your suggestions and help.


    prpldude Guest

  9. #8

    Default Re: Help with URL in database

    and the above url does not act as a link.
    prpldude Guest

  10. #9

    Default Re: Help with URL in database

    Hey Marc

    So when you do a <CFDUMP VAR="#listing#"> what is the myURL column showing?

    is it

    #[url]http://www.pinnaclespokane.com/properties/washington/lease/spokane/10604e16th/1[/url]
    0604e16th2.htm#
    or

    [url]http://www.pinnaclespokane.com/properties/washington/lease/spokane/10604e16th/10[/url]
    604e16th2.htm

    If the dump shows the surrounding '#' marks then they are in the field in the
    database and need to be removed
    (perhaps there is a problem wtih your update if you are adding these addresses
    to the database using cold fusion).

    Zoe


    zoeski80 Guest

  11. #10

    Default Re: Help with URL in database

    Thanks Zoe and Phil. The problem was with my Access database. When I formated
    the column to be a hyperlink it added the # signs. So I just changed the column
    from hyperlink to text and that fixed all my problems.

    I appreciate all the help.

    prpldude 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