 <p>You will have to use a complex combination of the <code>SUBSTR</code> and <code>LOCATE</code> functions that are in MYSQL.</p> <p>For details on <code>SUBSTR</code> <a href="http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_substr" rel="nofollow">click here</a>.</p> <p>For details on <code>LOCATE</code> <a href="http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_locate" rel="nofollow">click here</a>.</p>