mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 00:53:04 +02:00
- bug fixed : can't find a new category id for virtual category creation if
no existing category. git-svn-id: http://piwigo.org/svn/trunk@728 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
+1
-1
@@ -78,7 +78,7 @@ SELECT id,uppercats,global_rank,visible,status
|
||||
|
||||
// what will be the inserted id ?
|
||||
$query = '
|
||||
SELECT MAX(id)+1
|
||||
SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1)
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
;';
|
||||
list($next_id) = mysql_fetch_array(pwg_query($query));
|
||||
|
||||
Reference in New Issue
Block a user