Quote:
Originally Posted by k0nr4d
Your description is kind of odd but I think you are looking for CONCAT.
SELECT CONCAT(`animal`,'zombie') AS animal FROM pets WHERE `item` = 'dog'
If you mean you want to replace dog, cat, and fish with 'zombie' then
REPLACE(`animal`,'dog','zombie')
If you want to replace multiple, then something like
REPLACE(REPLACE(REPLACE(`animal`,'fish','zombie'), 'cat','zombie'),'dog','zombie')
|
Thanks, going to lookup CONCAT now. [edit] No, not what I'm wanting, the replace is what I am trying to do but being lazy about it and not having to type out a few hundred individual words to replace with 'zombie' lol
What if there are thousands of rows with different items, say 100 different items plus, is the only way to replace them by using each items value?