Joshua,
You really need to parse that file and put each section in its own colum in the
database. this will make for a much
better search.
You'll need two <cfloop>s:
The first parses the file using the linebreak as the delimeter.
The second will parse each line using a space " " as the delimeter.
After you close the second loop and before you close the first loop, you have a SQL
statement that will insert the
current line's data into a database row.
I don't have any sample code with me, but you can find exactly what lead me to this in
the first Forta book, in the
section about using <cffile> to read a file.
Once you have a db table set up with colums like these: RowID, theDate, someNum, type,
theMsg , you can actually
search the data.
HTH,
Adrian J. Moreno
North Texas Web Design
Joshua Tipton wrote:
> I have a text file that I imported into SQL. here is a sample of it:
>
> 20010107 132319 MSG Message Engine is Started.
> 20010107 134037 JOB Job Engine is Started.
> 20010107 134038 MSG Message Engine is Started.
>
> When it is put into the database it is all in one column. I want to know
> how can I search that column using cf and only return info that i want from
> a certain date.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists