diff options
Diffstat (limited to '')
-rw-r--r-- | admin/cat_list.php | 2 |
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)); |