Azu Posted September 12, 2007 Share Posted September 12, 2007 Hello In PHP I can put {1} or {2} or whatever to access the first or second or whatever character in the string.. how do I do this in MySQL? Quote Link to comment Share on other sites More sharing options...
recklessgeneral Posted September 12, 2007 Share Posted September 12, 2007 Hi, I don't see a nice simple way of doing this (there may be one), but you could acheive the same thing with substring. For example, substring(name,3,1) will return the 3rd character of name. Cheers, Darren. Quote Link to comment Share on other sites More sharing options...
Azu Posted September 12, 2007 Author Share Posted September 12, 2007 Thanks! This works perfectly! =) It's not shorthand like {1} {2} {3} etc but it's the same functionality Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.