List:General Discussion« Previous MessageNext Message »
From:Jerry Preeper Date:September 27 1999 10:30pm
Subject:(OT) difference between two text blob inputs
View as plain text  
Sorry for the somewhat off-topic post but I tried searching the archives
and as well with no luck.  I'm working on a news/story database
that allows editing of stories.  I want to keep a separate changelog table
that basically just contains a storyid, who changed it id, a timestamp and
the changes in the story (ala diff maybe in a text blob).  When I call up
the edit form in perl, it contains the old story (from the story table) in
an input field that allows the changes to be made.  What I would like to do
is show something like the following in the changelog table in a text blob:

OLD: Bob jumped over a blue dog
NEW: Bob jumped over a red dog

I was thinking of writing each of the stories to temp files, running diff
on the two, replacing the > and < with old and new and then doing the
updates to the tables.  But this seems awfully complicated for what should
be easy.  Anyone have any suggestions for a routine to compare the new
input to the old text blob, then update the story table and the changelog

Thanks in advance

(OT) difference between two text blob inputsJerry Preeper28 Sep
  • Re: (OT) difference between two text blob inputsDaniel Koch28 Sep