imported_smile
Member
Hi, I have a datbase tabe like this:
CREATE TABLE `paper` (
`id_paper` INTEGER(11) NOT NULL AUTO_INCREMENT,
`sample_url` VARCHAR(50) COLLATE utf8_general_ci NOT NULL DEFAULT '',
PRIMARY KEY (`id_paper`)
When I add new record I need the field "sample_url" to automatically add this information:
images/15_sample.jpg.
images - is subfolder where my images are stored
15 - is id_paper (new primary autonumber ID)
_sample.jpg - is static and should be added.
I retrieve my data like this:
SELECT
paper.id_paper,
paper.sample_url,
concat('<img src=images/', sample_url, ' ' 'width="66" height="174" />') AS sample
FROM
paper
How do I do this?