MySQL Forums
Forum List  »  PHP

Re: How to fwrite the result of the query as string?
Posted by: Roland Bouman
Date: August 10, 2005 06:14PM

you can always force this usign

lpad(str,length,padstr), so for your example:

lpad(numcolumn,5,'0')

should work. If you always need that column in that format, consider altering the format at the level of the datatype to:

SMALLINT(5) ZEROFILL

Options: ReplyQuote


Subject
Written By
Posted
Re: How to fwrite the result of the query as string?
August 10, 2005 06:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.