Hi David,
| how to retrieve the 2 last char of a string stored in db ? :
| SELECT LENGTH(db) as len , SUBSTRING(db from len-2 ) from
| nlconfig;
You could try,
select substring(db, length(db) - 1, 2) from nlconfig;
The SQL you wrote would perhaps not work in any database.
|
| In php by example, there is a substr with a negative pos
| that give char at end ! no in mysql !
Is there any reason you feel PHP and MySQL should have the same syntax?
Anyway, hope I helped.
Shanx
--
If it goes without saying, let it.
Shashank Tripathi
www.shanx.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php