aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-02-07 21:44:21 +0000
committerplegall <plg@piwigo.org>2005-02-07 21:44:21 +0000
commit7d51de44ee58de4f10c39775291f6f10ad6c8d42 (patch)
tree6c771163c69ac3268b3b262479a817681bdf15d5
parent357ed721630c43306838bf5ba49cc0038ceeaeb8 (diff)
- 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
Diffstat (limited to '')
-rw-r--r--admin/cat_list.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php
index bcfe152f2..b5b4a6852 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -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));