EasyCFM.COM ColdFusion Forums / Good Coding Tips! / The Coding CF

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: The Coding CF

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

gurpreet
07-01-2005 @ 10:19 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 18
Joined: Jun 2005

My this problem has been solved thanks for this, i have another problem that i have apage called GETQUOTES.cfm where I get Quotes from database on regular basis and I have link to add them side by side, everything is displayed properly, the quote is inserted properly and when i try to view the quote, it diasply nothing , but when i try to run on my local machine it works very fine, what the cause could be????

The query are like as:

<cfquery datasource="dsn" name="ans">
select count(ID) as singlequote1 from q
</cfquery>

<cfquery datasource="dsn" name="Selected">
Select q.ID, q.Quotes, q.submitted_by, q.submitted_on
from q where ID = #RandRange(1,ans.singlequote1)#
</cfquery>
<table align="center" border="0">
<tr>
<td valign="top">Here's The Quote:</td>
<td><span style="color:red;">
<cfoutput query="Selected">
#Trim(Quotes)#
</cfoutput></span>
</td>
</tr>
<tr>
<td>Submitted By:</td>
<td><span style="color:red;"><cfoutput>#Selected.submitted_by#</cfoutput></span></td>
</tr>
<tr>
<td>Submitted On: </td>
<td><span style="color:red;"><cfoutput>#DateFormat(Selected.submitted_on)#</cfoutput></span></td>
</tr>
<tr>
<td><input type="button" value="Get New Quote" onClick="location.href='getquote.cfm'"></td>

Gavy Randhawa

CJ
07-02-2005 @ 12:38 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4262
Joined: Oct 2002

are you sure the database on your production server has the same records as the database on your development box?

do a <cfoutput>#selected.recordcount#</cfoutput> or a <cfdump var="#selected#"> to make sure you're getting any records at all from your query.  if you're not getting any, then the problem is the database.  if you are, then the problem is in the display code.

so the first step is isolating where the error is occurring.

-CJ-
@ #coldfusion/DALNet
http://charlie.griefer.com


Website Designed and Developed by Pablo Varando.