Exemple #1
0
 /**
  *  Edits a category
  *
  *  @param  -   String  $name   The name
  *  @param  -   int     $id     The id
  */
 function edit_category($id, $name)
 {
     if (Rsys::check_category($name, $id)) {
         $sql = "UPDATE " . Rsys::getTable("category") . " SET name = '" . Database::escape_string($name) . "' WHERE id =" . Database::escape_string($id) . "";
         Database::query($sql);
         return $id;
     }
     return false;
 }