macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Re: combine queries

Subject: Re: combine queries
From: "splitzer"
Date: Tue, 7 Aug 2007 21:32:53 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
[q][i]Originally posted by: [b][b]Dan Bracuk[/b][/b][/i]
 You say you want your results sorted but neither query has an order by 
clause.[/q]

 Yea, i know. I was refering to this query:
 <cfquery name="wall" datasource="#APPLICATION.ds#">
     SELECT *
     FROM db_new.wall, dodisturb.user_registration
     WHERE profileID = #URL.id# OR myID = #URL.id# OR user_registration.id = 
#URL.id#
     ORDER BY date DESC
 </cfquery>

 As you can see in the images i posted. I try to sort columns by date, but what 
it also does is that it repeats so many results by itself for some reason which 
i dont even have.

 BKBK:
 I tried the query again, but the query shows repeated results. The data is 
being repeated upto 3-4 times. I think what its doing its actually joining 
similar columns. 
 <cfquery name="uniqueQuery" dbtype="query">
 SELECT *
 FROM favorite_sites, notes_get
 </cfquery>


<Prev in Thread] Current Thread [Next in Thread>