Changeset 4892 for trunk/include/dblayer/functions_pgsql.inc.php
- Timestamp:
- Feb 15, 2010, 8:49:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/dblayer/functions_pgsql.inc.php
r4886 r4892 193 193 } 194 194 195 function pwg_db_insert_id() 196 { 197 // select currval('piwigo_user_id_seq'); 195 function pwg_db_insert_id($table=null, $column='id') 196 { 197 $sequence = sprintf('%s_%s_seq', strtolower($table), $column); 198 $query = ' 199 SELECT CURRVAL(\''.$sequence.'\');'; 200 201 list($id) = pwg_db_fetch_row(pwg_query($query)); 202 203 return $id; 198 204 } 199 205
Note: See TracChangeset
for help on using the changeset viewer.