database editing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
documentx
Forum Newbie
Posts: 1
Joined: Sun Aug 17, 2008 12:43 pm

database editing

Post 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?
Post Reply