[ic] StaticFly

Grant interchange-users@icdevgroup.org
Tue Nov 26 23:04:00 2002


>> I'm thinking I need something to periodically (daily) run through that
>> keyword matching for every product in the products database and
>write each
>> set of results to a field for each product.  That way I won't have to run
>> through that search and evaluation every time a flypage is loaded.  I
>guess
>> the best way to do that would be with a cron and a series of loops and
>data
>> tag?
>
>    You could set up a keywords table with two fields, "keyword" and
>"itemcode".  Each keyword in the product file keywor field would generate a
>new row in your new keywords table.  During your cron job, take your
>products keywords and split them apart, and add/remove/delete keywords from
>your keyword table as necessary.  This table could be searched fast because
>you would be looking for exact matches.
>
>Jeff

Thanks to Barry, Jeff, and Paul for your help on this one.  Jeff, your
solution above is truly great.  From what I can tell, this will really help
me out.  Would the following run in a cron accomplish this:

[loop prefix="outside" search="ml=1000"]
	[loop prefix="inside" list="[loop-field keywords]"]
		[data table="keywords" column="item" key="[inside-code]" value="
[outside-code]" append="1"]
	[/loop]
[/loop]

Would this be too many consecutive writes to the database considering it's
not SQL, it's just the default one?  If a certain row does not exist, will
the data tag above add it?  Also, how could keywords (rows) be actually
deleted from the "keywords" database as you suggested?

- Grant