Reply to Re: convert 16-byte hex "string" to dec in php

Your name:

Reply:


Posted by petersprc on 04/09/07 02:54

You could try this function to convert a very large value from hex to
decimal:

http://us.php.net/manual/en/ref.bc.php#25336

It uses the bcmath arbitrary precision functions.

On Apr 8, 2:53 pm, "Sergei Shelukhin" <realg...@gmail.com> wrote:
> Hi.
> I have a string, 16 bytes long, representing a hex number.
> I need to convert it to a number and put it into pgsql database; it
> complicates the matters further cause pgsql doesn't support unsigned;
> thus I have to subtract "magic" number (half the bigint range) from
> the conversion result to put it into pgsql.
>
> Is there any way to achieve this?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация