RE: [phplib] PHPlib cvstree without changes... From: Christian Stocker (chregu <email protected>)
Date: 05/06/01

Hi

> It's true... :( Stig out and out said "that will be implemented over my dead
> body". It being a tie in to mysql_insert_id with Pear::DB. Someone was going
> to write a generic function that on mysql would use mysql_insert_id and on
> most other DB's just be a no-op BUT...Stig is against it so it will never get
> committed to Pear. :(

if you're code does not have to be very portable to other rdbms, then you
can use the mysql_inserted_id nevertheless with pear. just write

$db->query("insert your sql command" )
$last_id = mysql_insert_id($db->connection);

and there you have the last_id. it's nasty, but i think, if it would be in
pear (as a db-abstraction layer), it'd be nasty too.. it gives the
impression, every db supports that, which it doesn't.. use better
nextId(), if you somehow prefer portable code.

chregu

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>