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
Following on from last month's Select the 1st letter of the last word in MySQL, I then needed a way to select the last word from string (or column).

SELECT REVERSE(LEFT(REVERSE('Iain Cuthbertson'), LOCATE(' ', REVERSE('Iain Cuthbertson')) -1));


Now I can sort rows by surname when the full name is in just one cell!


Diary feed
 + RSS 2.0 XML feed


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