update column in all rows in mysql

Viewed 1609

I have a table called tbl_portfolio described as below and i want to modify all imagePath columns by adding projectId at start, i.e abc.jpg will change to <project_id>/abc.jpg.I am not very skilled with Mysql.. :(

| portfolioId | int(11)      | NO   | PRI | NULL    | auto_increment |
| projectId   | int(11)      | YES  |     | NULL    |                |
| customerId  | int(11)      | YES  |     | NULL    |                |
| imagePath   | varchar(500) | YES  |     | NULL    |                |
| description | text         | YES  |     | NULL    |                |
| addDate     | date         | YES  |     | NULL    |                |
| lastUpdated | date         | YES  |     | NULL    |                |
| coverPhoto  | int(1)       | YES  |     | 0       |                |
7 Answers
Related