forked from science-ation/science-ation
30 lines
844 B
PHP
30 lines
844 B
PHP
<?
|
|
function so_team_add($schools_id, $conferences_id, $name) {
|
|
$schools_id=intval($schools_id);
|
|
$query = "INSERT INTO so_teams (`schools_id`, `conferences_id`, `name`) VALUES ({$schools_id},{$conferences_id},'".mysql_real_escape_string($name)."')";
|
|
return mysql_query($query);
|
|
}
|
|
|
|
function so_team_edit($schools_id, $team_id, $name) {
|
|
$schools_id=intval($schools_id);
|
|
$team_id=intval($team_id);
|
|
$query = "UPDATE so_teams SET name='".mysql_real_escape_string($name)."'
|
|
WHERE schools_id='".$schools_id."'
|
|
AND id='".$team_id."'";
|
|
return mysql_query($query);
|
|
}
|
|
|
|
|
|
function so_team_delete($schools_id,$team_id) {
|
|
$schools_id=intval($schools_id);
|
|
$team_id=intval($team_id);
|
|
$query = "DELETE FROM so_teams WHERE schools_id=$schools_id AND id=$team_id";
|
|
mysql_query($query);
|
|
if(!$mysql_error) return true;
|
|
else return false;
|
|
}
|
|
|
|
|
|
|
|
?>
|