sungpeng Posted September 27, 2015 Share Posted September 27, 2015 I wish to add some text after the current string data in sale. Concat not working is there any problem with this code ? $title="addtext"; $update_status=mysql_query("update product set sale=CONCAT(sale,$title) "); Quote Link to comment Share on other sites More sharing options...
Solution Barand Posted September 27, 2015 Solution Share Posted September 27, 2015 $title needs to be in single quotes otherwise SQL is looking for a column called "addtext" You need to specify the record to be updated otherwise all records will get the same update "update product set sale=CONCAT(sale, '$title') WHERE product_id = $whatever" Quote Link to comment Share on other sites More sharing options...
sungpeng Posted September 27, 2015 Author Share Posted September 27, 2015 thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.