asp alignment statement??? help!

Results 1 to 2 of 2

Thread: asp alignment statement??? help!

  1. #1
    Join Date
    Dec 1969

    Default asp alignment statement??? help!

    At my online university, when a course in the registration process is not available, we have the link to the course dimmed (or shown "not available" so the student can&#039;t click it) but lets say there are a lot of courses on one page that aren&#039;t available, but a few that are available. i&#039;d like to have a script that deciphers if the course is available by aligning the courses at the top page and the unavailable courses at the bottom of the page.<BR><BR>i&#039;ve seen this EXACT function at click the chess board game link at the provided web address enter the following info if you wouldn&#039;t mind. member name: 4guys2 password: fromrolla<BR><BR>notice the different rooms are organized by what is available. so my question is, is there are way to do this with asp?<BR><BR>thanks so much for your help!<BR><BR>Evan

  2. #2
    Join Date
    Dec 1969

    Default Not really ASP...just SQL

    In the query you use to get the list of courses, just add in a clause in the ORDER BY to put them in the right order.<BR><BR>You don&#039;t say HOW you know a course is not available. But let&#039;s say there is a field named "CLOSED". If true, the course is not available. <BR><BR>So you do:<BR><BR>SELECT ... FROM courses<BR>WHERE ....<BR>ORDER BY CLOSED DESC, COURSE_NUMBER, ...<BR><BR>Whether you use CLOSED DESC or CLOSED ASC depends on how a true/false field is stored and sorted in the DB you are using. Try both.<BR><BR>If you don&#039;t have a separate CLOSED (or OPEN!) field, but you do have an "AvailableSpaces" field or the like, then do:<BR><BR>SELECT ... FROM courses<BR>WHERE ....<BR>ORDER BY ( AvailableSpaces &#062; 0 ) DESC, COURSE_NUMBER, ...<BR><BR>Again, whether you need DESC or ASC depends on the DB.<BR><BR>Try this! <BR><BR>And next time tell us what DB you are using. It makes it a *lot* easier to answer questions.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts