Reputation: 57
I am new to database and using myPhpAdmin, in my table there is field notification_icon which include icon address, i put all image icons but i forget to add path of these icons which is common for all,
Is there any query to update image path in all, I tried:
UPDATE `notifications_notificationconfiguration` SET `notification_icon`="directory_path/"+`notification_icon`;
But this make all fields 0
Upvotes: 0
Views: 37
Reputation: 607
Query you have will work for numeric data types eg int
but for string data types eg varchar
You should use CONCAT
function.
UPDATE `notifications_notificationconfiguration`
SET `notification_icon`= CONCAT("directory_path/",notification_icon);
Upvotes: 1