This content has been marked as final. Show 3 replies
Check your db documentation for functions that sound like substring or position.
Because of the memo field you note in your summary, is it safe to assume this is an Access DB? If this is an Access DB, is there a particular benefit to running this sort of filter at the DB level?
In my previous experience, MS Access was not only a slower database (than SQL Server or MySQL, for example). but it isn't a true database server and easily locks up when experiencing higher loads.
It might be easier, and without any significant a performance, to manipulate the article body content/string in CF.
<cfquery name="rs" datasource="#dsn#>
select article_id, article_body
where article_id = #id#
Once you get the record you want, you can use a variety of ColdFusion's string functions (see live docs for more options) to pull the section you want from the article_body.
// quick and dirty -- certainly more effective ways
readMorePos = ReFindNoCase("id=systemreadmore",rs.article_body);
readMoreBody = RemoveChars(rs.article_body,1,readMorePos-1);
Thanks a lot guys for the ideas. I will have to look into these and see what I can come up with. I don't really need to do this processing on the database side, I can do it through CF logic also.