SQL Update Query (Update part of column)
Hello ,
i'am trying to update part of column with new value
here an example :
old value is :
Code:
<address>
<object width=\"526\" height=\"415\" data=\"http://www.youtube.com/v/XXX2urcV4zg&hl=fr&fs=1&rel=0\" type=\"application/x-shockwave-flash\">
<param name=\"allowFullScreen\" value=\"true\" />
<param name=\"allowscriptaccess\" value=\"always\" />
<param name=\"src\" value=\"http://www.youtube.com/v/XXX2urcV4zg&hl=fr&fs=1&rel=0\" />
<param name=\"allowfullscreen\" value=\"true\" />
</object>
</address>
i want to update with that change width 526 value & height 415 value by width 619 value & height 487 only
Code:
<address>
<object width=\"619\" height=\"487\" data=\"http://www.youtube.com/v/XXX2urcV4zg&hl=fr&fs=1&rel=0\" type=\"application/x-shockwave-flash\">
<param name=\"allowFullScreen\" value=\"true\" />
<param name=\"allowscriptaccess\" value=\"always\" />
<param name=\"src\" value=\"http://www.youtube.com/v/XXX2urcV4zg&hl=fr&fs=1&rel=0\" />
<param name=\"allowfullscreen\" value=\"true\" />
</object>
</address>
My Current query is
Code:
update news set flashNews=replace(flashNews,'width=\"526\" height=\"415\"','width=\"619\" height=\"487\"')
Thanks
Re: SQL Update Query (Update part of column)
Thanks for sharing what you are doing but this isn't twitter.
Do you have a question? Are you getting an error? What database are you using?
Re: SQL Update Query (Update part of column)
MySQL
executed the query but no rows been affected