|
Hi,
Just a simple one!
I have written a news script which works perfectly, hurray! Anyway, I use MAX() to select the lestest news article from the MySQL database. This workd fine until you come to the number 9. MAX() doesn't like different number legths. I have come up with a solution but don't know how to do it.
I want to turn 1 into a 5 digit number... eg. 00001 and 2 to 00002 etc. So when it runs into double figures it will still be the same number length, eg. 00010, 000011 etc.
Hope you understand what I'm getting out and that someone can help me out with this one.
Many Thanks
Adam
|