Hi all,

I'm stuck on the following query (SQL Server 7). I have this:

<cfquery name="get_messages" datasource="#application.dsn#">
  select messages.text, messages.edit_date, users.name
  from   messages, users
  where  users.id = messages.sender
</cfquery>

which is fine. However, if messages.edit_date is not null, I want to get
another users.name that corresponds the id number stored in
messages.edit_user, and display that in the middle of the same <cfoutput>
block. I'm not sure how to differentiate the two users.name values, and how
to keep them both with the right record. Can it be done in one query?
Basically I'm trying to display a forum post, along with the username who
posted it, and the username who last edited if it has been edited at all.

Any help would be great...

Kay.
_____________________________________________________
Kay Smoljak - HTML/ColdFusion Developer - PerthWeb Pty Ltd
Internet Solutions for your business!

Level 9/105 St George's Tc - Perth - Western Australia
Ph: (08) 9226 1366 Fax: (08) 9226 1375 Mobile : 0419 949 007
Visit Perth online! : www.perthweb.com.au

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to