science-ation/so_teams.inc.php

32 lines
819 B
PHP
Raw Normal View History

<?
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.",
".$conference['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."'";
return mysql_query($query);
}
?>