$value = serialize($value);
$mysqli = new mysqli(DB_HOST,DB_LOGIN,DB_PASS,DB_NAME);
$q = $mysqli->prepare("UPDATE `settings` SET `value` = ? WHERE `name` = 'groups'");
$q->bind_param("s",$value);
$q->execute();
$q->close();
$mysqli->close();