Display Records in certain order (string contained in field)



Just can't figure out how to do this..........
I have a simple asp page that desplays images from database.

The query on my page:
-------------------------
imagequery = "SELECT * FROM FILE_LIST WHERE CLASS_ID=" & FORM_ID
------------------------
The table FILE_LIST contains a field called TITLE which never gets
displayed.
(the form_id comes from a selection on previous page)
I display the images with a do loop as follows:
---------------------------
<%
set rstemp=conntemp.execute(imagequery)
If rstemp.EOF Then
Form_file_ID = 0
Else
do while not rstemp.eof
%>
<CENTER><IMG SRC="imagehelper.asp?FILE_id=<% = rstemp("FILE_id")
%>"></CENTER>
<%
rstemp.movenext
loop
END IF
rstemp.close
set rstemp=nothing
%>
--------------------------
I want to have the images that have the string 'photo' within the 'TITLE'
field disply FIRST
(eg. one with the title 'A photo of a cat' would desplay before 'A drawing
of a Cat' )
and THEN the ones that don'tt. I think I can accomplish this some kind of
if statement in the loop,
but I just cant get it to work without the ones containing 'photo'
displaying twice.
I hope I've explained this adequately.
Thanks in advance to anyone who has any ideas.


.



Relevant Pages

  • Re: [PHP] Creating Next & Previous for PHP Photo Gallery
    ... stuck at is the Next & Previous links for the Photos on the main Photo Page. ... the thumbnails ­ displays them on a page ­ which are automatically linked to ... the Full Size Images. ... # Display the link if they exist ...
    (php.general)
  • Re: Display photos in Outlook 2003 e-mail
    ... > When I recieve an e-mail I have to open each photo attached. ... MIME parts with content disposition of "attach"). ... Outlook does NOT have the preview area appended onto the display of a ... message to show graphical images with content disposition "attach" as ...
    (microsoft.public.outlook.general)
  • Re: Switch images at timed interval
    ... I have a page that has a photo in the center and I'd ... Any number of images, random ... display, no repeats per cycle. ... Gecko (because their javascript is demented.) Javascript. ...
    (alt.html)
  • jpg / gif images smeared on IE6-Outlook6
    ... Red X Instead of Images - Can't see or save Images/Pictures ... Change the DPI setting from Large to Normal and see if that helps. ... unchecked to display pictures all the time. ... Please reply to the newsgroup so others may benefit. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Old issues never die, just fade away
    ... images I try displaying in the e-mail body either by ... either don't display or when they do, they're represented by the red 'x', ... pictures in this message could not be found. ... same thing (using a jpg from another non-iconned sub folder of the same ...
    (microsoft.public.windowsxp.general)

Loading