SELECT LPAD(column_name, '6', '0') FROM table_name;
Gurhan
-Original Message-
From: Morten Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 4:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Zeropadding
Hi,
I use MySQL where I have a table. One of the fields is an INT(6), which I
zeropad. When I try to get the number to a variable it doesn't contain all
the numbers. If I give it a value of 59 I extract 59 and not 59. Is
there a way I can get the hole number?
Regards,
Morten
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php