public function updateGroupsRows($text, $id, $sportId)
{
if ($this->conn->checkAdmin()) {
$int = new Zend_Validate_Int();
if (!$int->isValid($id)) {
return $this->test;
}
if (!$int->isValid($sportId)) {
return $this->test;
}
$validator = new Zend_Validate_StringLength(2, 100);
if (!$validator->isValid($text)) {
return $this->test;
}
$query = "CALL updateGroups('" . $text . "','" . $id . "');";
$result = $this->conn->insert($query);
$query = "CALL selectGroups( '" . $sportId . "');CALL selectSports( )";
$result->message = $this->conn->multiresultbackArray($query);
return $result;
} else {
$this->test->type = "error";
$this->test->info = "nologin";
return $this->test;
}
}