Is it possible to customize a string which return from a mysql database?
I have a field which is image name and i would like to join it with my directory path.
SELECT * FROM brand
//row return.
id image_name
1 image1.jpg
//i would like to have my return like
id image_name
1 upload/image1.jpg
What you’re looking for is concatenation. Refer to this for MySQL concat.
Basically, you could do
which would return /path/to/dir/filename