ibase_gen_id

(PHP 5)

ibase_gen_id --  Increments the named generator and returns its new value

Description

mixed ibase_gen_id ( string generator [, int increment [, resource link_identifier]] )

Внимание

К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.

Returns new generator value as integer, or as string if the value is too big.



ibase_gen_id
escoric at latinmail dot com
17-Aug-2004 10:00
$sql="INSERT INTO mitabla(campo1,campo2,..campo n) VALUES(GEN_ID(mitabla1_codigo_gen,1),'contenido 1', 'contenido 2', 'contenido n' )";
mfischer at php dot net
28-Apr-2004 04:54
Question arose on php-dev:

How does ibase_gen_id() handle 64bit values?

Interbase 6/Firebird generators are always 64-bit signed integers
(Firebird's BIGINT type), regardless of the platform the client is
running.
On 64-bit platforms, this will never require conversion as PHP's int
type is 64 bits wide on those platforms. On 32-bit platforms, the
generated value is converted to a string if it exceeds the limits of a
32-bit signed integer.
(This behaviour is consistent with the ibase_fetch_*() functions, that
will use strings to represent numerical values that cannot be represented
accurately using native PHP numerical types.)

[Edited by PHP/Interbase maintainer.]

<ibase_free_resultibase_maintain_db>
 Last updated: Mon, 14 Nov 2005