Page 1 of 1

database editing

Posted: Sun Aug 17, 2008 12:59 pm
by documentx
Hi,
I have a problem which I don't know how to save. I have a huge mysql database and then table with two rows named title and content. I have an array of words, and I want to copy the first word in the content of each line where the first word is not one of the words I have in array. I want to add that word to the title.
Example:

TITLE ...... CONTENT
green ...... about five
blue ...... go down
yellow ...... make me sick
red ...... go five

array('go', 'make', 'five', 'dodo'...);


The result should be:

TITLE ...... CONTENT
green about ...... five
blue ...... go down
yellow ...... make me sick
red ...... go five

Can you give me some tips how to programme a script not to copy everything by hand?