I need to add a βprefixβ before each value in a specific column.
Example: all fields in column x: 200, 201, 202, 203, etc. I need them to be pn_200, pn_201, pn_202, pn_203, etc.
Is there any way to use ALTER or MODIFY commands for this?
I would like something like ADD to BEGINNING of * column_name 'pn_'
Or perhaps a way to do this in PHP ? Maybe get the value of the field, turn it into a variable and do something like.
`$variablex = `'SELECT column_name FROM table' $result = mysqli_query($con, variablex); foreach($r=mysqli_fetch_row($result) { `ADD TO BEGINNING OF * column_name 'pn_'`
Is there any way to do this?
source share