Link to home
Start Free TrialLog in
Avatar of yarekGmail
yarekGmail

asked on

mysql concat and substr simple question

Hello
I have in my database users, fields name username who contains for instance the value dialogoo
I need to write a simple select function that selects:
pix1/d/di/dialogoo-1.jpg

pix1 is FIXED
d is the first letter
di are the first 2 letters
-1.jpg is fixed

so it it something like
SELECT "pix1/"+{firstLetter(username)+"/"+{first2Letters(username)}+"/"+{username}+"-1.jpg"
Any clue ?

regards
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial