Re: postgres - mysql last_inserted_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El Vie 01 Jul 2005 06:27, david forums escribió:
> 
> before any insert call the id.
> 
> select nextval('tablename_seq');
> 
> and pass this id to your insert.

No. Best is to but a DEFAULT clause of nextval('tablename_seq') in the table 
definition.

-- 
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
---------------------------------------------------------
Martín Marqués          |   Programador, DBA
Centro de Telemática	|     Administrador
               Universidad Nacional
                    del Litoral
---------------------------------------------------------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux