Ask a Question related to Coldfusion Database Access, Design and Development.
-
prpldude #1
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> OR</SPAN> MSW GRAPHICS
AS
TO THE ACCURACY OF THE INFORMATION CONTAINED HEREIN. THE SAME IS
SUBMITTED SUBJECT TO ERRORS, OMMISSIONS, CHANGE OF PRICE, OR WITHDRAWAL
WITHOUT NOTICE AND ANY SPECIAL LISTING CONDITIONS IMPOSED BY OUR
PRINCIPALS. 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
-
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... -
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 ... -
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... -
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... -
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... -
philh #2
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
-
umms_gary #3
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
-
prpldude #4
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
-
prpldude #5
Re: Help with URL in database
that url is suppose to be:
[url]http://www.pinnaclespokane.com/listings.cfm[/url]
prpldude Guest
-
philh #6
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
-
prpldude #7
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
-
-
zoeski80 #9
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
-
prpldude #10
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



Reply With Quote

