MySQL Php adding <h2> to a text In the Database -
i'm trying copy 1 column column grab column name , put inside column descrption stay on top of description,so far working ,i can't figure out how put finished product h2 e.g
name = best banana description = yellow thing ever end result name = best banana description = <h2>best banana</h2> yellow thing ever
this code far
$sql = "update product_description set description = if(description null, name, concat(name, description));";
i tried :
$sql = "update product_description set description = if(description null, name, concat('<h2>name</h2>', description));";
but '<h2>name</h2>'
displays word name in h2 , not table tips on how it?
try
$sql = "update product_description set description = if(description null, name, concat('<h2>', name, '</h2>', description));";
Comments
Post a Comment