Brother thank you! That was it!

I'm going to have to read up on this.

Gil
  -----Original Message-----
  From: Pascal Peters [mailto:[EMAIL PROTECTED]
  Sent: Monday, February 16, 2004 9:27 AM
  To: CF-Talk
  Subject: RE: sql, problem with

  You can use grouped output, but unless your title is unique you will
  have to order classes by ID

  Select c.classId, c.classTexts, c.classDescription,
  cc.classCodeSection, cc.classDate, cc.classTime,
  cc.classLocation, cc.classInstructor
  FROM CLASSES c, CLASSCODES cc
  WHERE c.classId = "">   AND ...
  ORDER BY c.classId, ...

  <cfoutput query="myQuery" group="classId">
  <!--- general info about class --->
  #myQuery.classDescription#<br>...
  <cfoutput>
  <!--- specific info about class code --->
    #myQuery.classCodeSection#<br>
    #myQuery.classDate#<br>
    #myQuery.classTime#<br>...
  </cfoutput>
  </cfoutput>

  Pascal

  > -----Original Message-----
  > From: mayo [mailto:[EMAIL PROTECTED]
  > Sent: maandag 16 februari 2004 14:54
  > To: CF-Talk
  > Subject: sql, problem with
  >
  > Currently I display a list of classes.
  > Simplified SQL and display below:
  >
  > SELECT *
  > FROM classes
  > WHERE
  > classCategory='$Category' AND
  > classDeleted=0
  > ORDER BY $order $reorder
  >
  > The presentation is:
  >
  > +------------------+----------+------------+
  > | CLASS TITLE      | LOCATION | CLASS CODE |
  > +------------------+----------+------------+
  > | CLASS DESCRIPTION <br/><br/>             |
  > | CLASS INSTRUCTOR <br/><br/>              |
  > | CLASS TIME                               |
  > +------------------------------------------+
  >
  >
  > Now, things are getting a little more complicated.  Each
  > class is going to have sections. So the display will be:
  >
  > CLASS TITLE
  > CLASS DESCRIPTION
  >
  > CLASS CODE : CLASS SECTION .. LOCATION .. CLASS TIME .. INSTRUCTOR
  >
  > example (simplified)
  >
  > +---------------------------------------------+
  > | INTRO TO AAA                                |
  > +---------------------------------------------+
  > | This is a really interesting ....           |
  > |                                             |
  > +---------+-----+------------+----------------+
  > |HT-111:A | NYC | 12:00-4:00 | Albert Alkin   |
  > |HT-111:B | JC  | 2:00-6:00  | Bob Bailey     |
  > |HT-111:C | BX  | 4:00-8:00  | Chris Cawley   |
  > +---------+-----+------------+----------------+
  >
  >
  > I'm having a really hard time coming up with the sql for this.
  >
  > tables below
  >
  > CLASSES
  > classID
  > classDescription
  > classTexts
  > classCost
  > classDeleted
  >
  > CLASSCODES
  >
  > classCodeID
  > classID
  > classCodeSection
  > classDate
  > classTime
  > classLocation
  > classInstructor
  >
  > I'm going nuts trying to get this. (using mysql)
  >
  > thx for any clues
  >
  > Gil
  >
  >
  >
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to