Notice: Undefined index: a in /home/lazyg72/HTML/global_subs.php on line 19
lazygnome - A big jumble of words
window rain

Iain's nonsensical words


Deprecated: Function ereg_replace() is deprecated in /home/lazyg72/HTML/diary.php on line 189
I recently had a need to select the 1st letter of the last word in a stored field.
This is my 10min stumbling result:

select SUBSTRING(REVERSE('Iain Cuthbertson'), LOCATE(' ', REVERSE('Iain Cuthbertson')) - 1, 1) as result;


MySQL only code I'm afraid folks.


Diary feed
 + RSS 2.0 XML feed


Everything on this site is (c) Iain Cuthbertson unless otherwise noted.