On 07-Jul-01 Chris Lambert - WhiteCrown Networks wrote:
> I've used integer on many occasions with auto_increment, and have had no
> problems. mysql_insert_id() returns the unique identifyer of the last record
> inserted with mysql_query(). I'm not sure what "MySQL function" you're
> referencing as an alternative, but you should be fine with an
PHP int values are signed integers, so when the database id > 2147483647
mysql_insert_id() will return negative values.
On 32bit compile:
INT = ok
INT UNSIGNED will break at 50% of the domain (of valid id's)
BIGINT UNSIGNED ~1%
I don't know if you can compile PHP for 64bit ... if you can then
the first three should be fine.
And you can always use mysql_query("select LAST_INSERT_ID()");
then treat the result as a string (which it is).
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]