Oh dear.... I must have missed something.

I read your email but still do not understand exactly what you are trying
 to
do.

Are you trying to loop through a query to identify the records that have
matching records in the text file?

Mike

-----Original Message-----
From: phumes1 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 1:11 PM
To: CF-Talk
Subject: Re: <CFFILE action="READ". Match against database


Hi again,

I'm stuck again. Not sure I'm going about this in the right way.

I'm querying the following database which has a listing of over 2000+ fon
ts.


<cfquery name="GetFontFamily" datasource="fontstyles">
        SELECT      sti, ID
        FROM        fontsti
        ORDER BY sti
</cfquery>


I then read in an external file which has a listing of only 5 font names

<cffile action="READ"
          file="c:\text.txt"
          variable="ReadMe">

Output:
----------
Hamburg
Palatino
Ultimate
Limerick

What I want to do is pluck out the corresponding .pfbs from the file I'm 
reading in against the above database.

The code below  (index.cfm) does a listing of all the fonts in my databas
e 
with a checkbox. The fonts checked are then passed to another page 
(create-list.cfm) which pulls all the corresponding .pfb files and displa
ys 
the results.

index.cfm
-------------

<cfform action="create-list.cfm" name="checkboxform" method="POST">
        <cfquery name="GetFontFamily" datasource="fontstyles">
                SELECT      sti, ID
                FROM        fontsti
                ORDER BY sti
        </cfquery>

        <td class="dirlinks">
        <cfoutput query="GetFontFamily">
                <cfif #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'BorderPi-15159' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Bundesbahn-Pi' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'CCH-Australia-Logos' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'CCH-Folio-Views' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'CCH-Logos' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'CCH-Logos-PH' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'CCHFM-Lawlines' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'CCHFM-Logos' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Carta' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Century' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Custom' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Environmental Logo' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Euro' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'European-Pi' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Garamond' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Helvetica' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Linotype-Decoration-Pi' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Linotype Holiday-Pi' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Lucida-Math-Extension' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Mathematical-Pi' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Old-Style-Seven' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Symbol' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Times' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Times-Serials' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Wood-Ornaments' OR
                          #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Zapf-Chancery-Dingbats'>
                        <input type="Checkbox" name="select"
value="#GetFontFamily.ID#" 
checked="Yes" required="Yes" onclick="this.checked=true;"><img 
src="../../images/blank.gif" width="3" height="14" alt="" borde=
"0"><font 
color="red">&nbsp;#LCase(ListGetAt(GetFontFamily.sti,1,'.'))#</font><br
>
                        <input type="hidden" name="ID"
value="#GetFontFamily.ID#">
                <cfelse>
                        <cfinput type="Checkbox" name="select" 
value="#GetFontFamily.ID#">&nbsp;#LCase(ListGetAt(GetFontFamily.sti,1,'
'))#
<br>
                </cfif>
        </cfoutput>
        </td>
</tr>
<tr>
<td class="navlinks">
<input class="navlinks" type="submit" name="Action" value=" Gener
ate ">
&nbsp;<input class="navlinks" type="submit" name="Action" value="
Clear" 
OnClick="window.close()">
&nbsp;<input class="navlinks" type="submit" name="Action" value="
Close" 
OnClick="window.close()">
<br>


create-list.cfm
--------------------

<cfquery name="GetMyFonts" datasource="fontstyles">
        SELECT          fontsti.sti, fontsti.ID, fontspecs.pfb
        FROM            fontsti, fontspecs
        WHERE           fontsti.ID = fontspecs.fontsti_ID
        AND     fontsti.ID IN (#form.select#)
        ORDER BY        sti
</cfquery>

<cfoutput query="GetMyFonts" group="ID">
        <font
class="navlinks">#LCase(ListGetAt(GetMyFonts.sti,1,'.'))#</font><br>
        <cfoutput><font
class="navlinks">[#GetMyFonts.pfb#]</font></cfoutput>
        <hr>
</cfoutput>

______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to