Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
drdagwood #1
Record Set & Next | Previous Links
Hi all,
well I've got the recordset down, so it seems, but everytime the page loads
and you hit hte next button only one or two fields change instead of all the
information. I'm using a query that takes data from 2 tables. If anyone can
help I would appreciate it. I've attached the code for your review.
Thanks,
D
query:
<cfquery datasource="#DataSource#" name="getPanelProperty">
SELECT *
FROM property, rent
WHERE property.oID = '#oID#' AND rent.oID = '#oID#'
ORDER BY property.pID
</cfquery>
Display:
<cfoutput query="getPanelProperty" group="pID"
startRow="#StartRow_getPanelProperty#" maxRows="#MaxRows_getPanelProperty#">
<tr bgcolor="###iif(currentrow MOD 2,DE('ffffff'),DE('efefef'))#">
<td><div align="center"><a href="rptProp.cfm?pID=#pID#">#pID#</a></div></td>
<td><div align="center">#pNickName#</div></td>
<td><div align="center">#pStatus#</div></td>
<td><div align="center">#DollarFormat(rAmount)#</div></td>
<cfif pStatus IS "Rented">
<cfinvoke component="owner" method="listMiDate" returnvariable="getMiDate"
pID="#getPanelProperty.pID#">
<cfset Date = DateFormat(Now(), "yyyy, mm, dd")>
<cfset MoDate = #DateFormat(getMiDate.moDate, "mm/dd/yyyy")#>
<cfset LeaseTime = #DateDiff( "D", Date, MoDate)#>
<td><div align="center">#LeaseTime# Days Remaining</div></td>
<cfelse>
<td><div align="center">#rLeaseTime#</div></td>
</cfif>
<td><div align="center">#rACH#</div></td>
<td><div align="center"><a
href="http://www.rentingyourhome.com/website.cfm?pID=#pID#"
target="_blank">Website</a></div></td>
</tr>
</cfoutput>
<cfoutput>
<tr>
<td width="23%" align="center"><cfif PageNum_getPanelProperty GT 1>
<a
href="#CurrentPage#?PageNum_getPanelProperty=1#Que ryString_getPanelProperty#">Fi
rst</a>
</cfif>
</td>
<td width="31%" align="center"><cfif PageNum_getPanelProperty GT 1>
<a
href="#CurrentPage#?PageNum_getPanelProperty=#Max( DecrementValue(PageNum_getPane
lProperty),1)##QueryString_getPanelProperty#">Prev ious</a>
</cfif>
</td>
<td width="23%" align="center"><cfif PageNum_getPanelProperty LT
TotalPages_getPanelProperty>
<a
href="#CurrentPage#?PageNum_getPanelProperty=#Min( IncrementValue(PageNum_getPane
lProperty),TotalPages_getPanelProperty)##QueryStri ng_getPanelProperty#">Next</a>
</cfif>
</td>
<td width="23%" align="center"><cfif PageNum_getPanelProperty LT
TotalPages_getPanelProperty>
<a
href="#CurrentPage#?PageNum_getPanelProperty=#Tota lPages_getPanelProperty##Query
String_getPanelProperty#">Last</a>
</cfif>
</td>
</tr>
</cfoutput>
drdagwood Guest
-
Adding previous and next links in the cfgrid
I have been reading through a few of these topics, and have not found an answer to this question. Is there built in functionality within MX7 that... -
ItemDataBound Event - How to access the previous record when this event is raised in DataGrid?
ItemDataBound Event - How to access the previous record when this event is raised in DataGrid? During "ItemDataBound Event", I would like... -
Next and Previous record
I am moving throught a set of records, my next works great but previous move to the first record. Also what is the best way to check and see if it... -
Copy value from previous record?
I have a field set up with the auto-enter option "copy value from previous record". Exactly _which_ record is "previous"... the help file doesn't... -
Fill a field from the previous record
I want to fill in one (1) text box with data from the previous record (same text box). I've used the code from:...



Reply With Quote

