I have a column in my db called storageFolder. All rows in said column contain the value 8 and is set INT (4).
In my SELECT query, I’m trying to return this column with a prefix of ‘group’, to make the record read ‘group8’.
I am trying to use CONCAT to do this, like this:
SELECT photoID, CONCAT('group',storageFolder) AS storageFolder FROM photos
But this always gets returned, with a zero:
storageFolder
----------------
group0
Any ideas?
I have managed to fix the problem. My column used to be a VARCHAR with the value of ‘group8’, I recently modified it to be an INT(4) with a value of ‘8’. Not sure what would have caused this error doing that. Anyway, I deleted the column and re-created it and works as intended. Strange!