Changeset 4892 for trunk/include
- Timestamp:
- Feb 15, 2010, 8:49:04 PM (14 years ago)
- Location:
- trunk/include
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/dblayer/functions_mysql.inc.php
r4833 r4892 158 158 } 159 159 160 function pwg_db_insert_id( )160 function pwg_db_insert_id($table=null, $column='id') 161 161 { 162 162 return mysql_insert_id(); -
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 -
trunk/include/dblayer/functions_sqlite.inc.php
r4833 r4892 215 215 } 216 216 217 function pwg_db_insert_id( )217 function pwg_db_insert_id($table=null, $column='id') 218 218 { 219 219 global $pwg_db_link; -
trunk/include/functions_comment.inc.php
r4325 r4892 169 169 pwg_query($query); 170 170 171 $comm['id'] = pwg_db_insert_id( );171 $comm['id'] = pwg_db_insert_id(COMMENTS_TABLE); 172 172 173 173 if (($comment_action=='validate' and $conf['email_admin_on_comment']) or -
trunk/include/ws_functions.inc.php
r4884 r4892 1248 1248 ); 1249 1249 1250 $image_id = pwg_db_insert_id( );1250 $image_id = pwg_db_insert_id(IMAGES_TABLE); 1251 1251 1252 1252 // let's add links between the image and the categories
Note: See TracChangeset
for help on using the changeset viewer.