Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sort a query from queryNew()

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi
I wanted to sort a query on time, from the time nearest to a time in a session var (session.time). My query:

<cfset tempvalue = queryAddrow(session.tidliste)><cfset tempvalue = querySetCell(session.tidliste,&quot;bid&quot;,session.ledig_bord.bid)>
<cfset tempvalue = querySetCell(session.tidliste,&quot;dato&quot;,session.dato)>
<cfset tempvalue = querySetCell(session.tidliste,&quot;time&quot;,session.ledig_bord.time)>
<cfset tempvalue = querySetCell(session.tidliste,&quot;ant&quot;,session.ledig_bord.ant)>
<cfset tempvalue = querySetCell(session.tidliste,&quot;bordnr&quot;,session.ledig_bord.bordnr)>
<cfset tempvalue = querySetCell(session.tidliste,&quot;mb&quot;,session.ledig_bord.mb)>
 
You can only sort a query that is read from a database. The query is sorted in SQL before being returned to ColdFusion If you are creating a query on the fly as you are here, there is no opportunity to sort it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top