Re: PHP integer limit and Oracle 8i sequences
| From: | Andreas Karajannis | Date: | Sat, 22 Jul 2000 09:13:11 +0000 |
| Subject: | Re: PHP integer limit and Oracle 8i sequences | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1418@lists.php.net to get a copy of this message | ||
"Fred M. Bulah" wrote:
>
> Hello,
> I am using PHP 4 and Oracle 8i for a very large database and have a question
> regarding the use of Oracle sequences as keys to tables and accessing those
> tables by key.
>
> Oracle sequences are auto-generated integers whose upper limit is 10**38.
> How large can a PHP 4 integer variable be? In "Professional PHP
> Programming" it says that the range for integers is -2 billion to +2
> billion. This was version 3+. Has this changed? The obvious problem is
> that when a sequence passes 2 billion, PHP 4 will not be able to handle the
> primary key.
>
AFAIK database values are retrieved as strings.
So as long as you don't explicitly convert to an integer or need to do
calculations (which implies type conversion), you should be ok. If in
doubt, create a descending sequence starting with the maximum value and
see if it works.
-Andreas