call me crazy, but wouldn't it just be easier if you held each of those four data items in different fiields?
if you're interested in modifying your database I can give you a few lines of code to make this a lot easier.
other than that, this is what I came up with (mind you it ain't pretty, bro):
$sql = 'SELECT projCode,'
.' REVERSE( LEFT( REVERSE( projCode ) , INSTR( REVERSE( projCode ) , "-" ) - 1 ) ) AS highest'
. 'FROM tbl_project'
. 'ORDER BY highest ASC ';
(guess that class in database design is useful for something.)
so, this returns two items:
the first is the projCode with the highest key number....the second is just just that key value which was necessary to do the work
happy PHPing,
-findapollo