You are here: Is it possible to change part of a db-fields content by sql statement? « MySQL Databases « IT news, forums, messages
Is it possible to change part of a db-fields content by sql statement?

Posted by Alexander Schoenhoff on 09/28/06 11:23

Hi y´all,

recently we´ve setup a webshop (mysql & php based) for a customer. All fine
and neat...

Now, after some thirdparty remodding, we learned that parts of the article
detail pages no longer had the looks they once had.
Especially the content of tables within the descriptive text (all in one
field of the db) are now in need of a tiny little correction.

The tag <table> should somehow be enhanced to <table class="data"> but with
more than 1200 articles it´s no fun thing to consider doing it by hand

So my question regards the handling of given content of one single db-field,
call it 'product_description'.
Is it possible to build a statement that uses 'product_description' in each
and every article?

Sure:
SELECT 'product_description' FROM shopdb...

But how would I go on telling MySQL that I wish it to
check every single articles 'product_description',
search for all occurrences of "<table>" within them
and replace each one of them with "<table class="data">" in one step?

Would this require some "assistance" say from php? If so how would you
formulate that?

Sorry for my blunt request for a working solution but I wouldn´t ask here if
my own research had been successful.
Perhaps I can´t see the woods for the trees, so any help or push in the
right direction would really be appreciated... :)

Best regs

Alex

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация