PDA

View Full Version : customisation of an 'id' field


danielwarner
11-27-2005, 08:53 PM
is there a way of changing the way my id field is displayed in mysql?

i want to change my currant style of: 1.. 2.. 3.. 4.. etc. to: 000001.. 000002.. 000003 etc...

is there an easy way of doing this? if not is it possible to change this in php so the id is displayed as 6 characters?

GJay
11-27-2005, 11:07 PM
sprintf("%06d",$id);
in PHP...