Microsoft
Software
Hardware
Network
Question : 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(usern
ame)+"/"+{
first2Lett
ers(userna
me)}+"/"+{
username}+
"-1.jpg"
Any clue ?
regards
Answer : mysql concat and substr simple question
yes:
1:
SELECT CONCAT('pix1/', LEFT(username,1),'/',LEFT(username,2), '/', username , '-1.jpg')
Open in New Window
Select All
Random Solutions
Error Number (515) Severity (16) State (3)
Loop through TOP1 SQL query in ASP
OSCommerce - How to Backup your Database?
Best practice. Multisite, single domain?
Live Audio Plugin
Macro to save e-mails to a file system location
Vista Backup error message 0x8007002
Mailbox Cleanup: Unread mail >31 days old
FindFirst in Access Form Not Moving to Record Although Record is Found
behaviour for clicking on image links, save as instead of opening in browser