[EMAIL PROTECTED] wrote:

Hi there is there any way at all that with a special field type mysql can
generate file numbers like so AUD-000001 then AUD-000002 .... AUD-00010
etc ... Let me know.


Use an auto_increment field, say an 'unsigned integer auto_increment primary key'.
Then do the formatting in code ( ie pad '1' to '000001', '45' becomes '000045', etc ). Then shove the 'AUD' bit at the start.
Using an integer as the primary key you'll get faster joins, searches etc than using a string fields as the primary key.


--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to