Hi.

On Tue 2003-02-04 at 17:04:39 -0000, [EMAIL PROTECTED] wrote:
> 
> I noticed that when you return a zerofill field from a select statement into
> a server-side language, say PHP or Perl, it will store the number with the
> zeros included, great no problem.
> 
> However, if I insert into that table which has a primary key which is set as
> a zerofill field, when I use the PHP command mysql_insert_id() it returns
> the primary key value, but without the zeros, is there any way round this
> apart from writing some code to add the zeros?

No, as mysql_insert_id operates on a number, not a string, so there is
no way to pass the leading zeros trough.

Regards,

        Benjamin.

-- 
[EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to