aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/include/functions.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index b4c12619a..ce7fa076f 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -666,12 +666,13 @@ function update_user_category( $categories )
$query.= ')';
$query.= ';';
$row = mysql_fetch_array( mysql_query( $query ) );
- $last_date = $row['last_date'];
// insert a new line in database
if ( $value_num++ > 0 ) $values.= ', ';
else $values.= ' ';
- $values.= '('.$user_id.",".$category['id'].",'".$last_date."'";
+ $values.= '('.$user_id.",".$category['id'];
+ if ( isset( $row['last_date'] ) ) $values.= ",'".$row['last_date']."'";
+ else $values.= ',NULL';
$values.= ','.$user_nb_subcats.')';
}
update_uppercats( $category['id'] );