Здравствуйте. Не работает UPDATE запрос. В чем может быть проблема?
$id = $_GET['id'];
$admin = new db();
$catid = $_GET['catid'];
if($id>0){
$game_edit = mysqli_fetch_array($game_ed);
echo $game_edit['name'];
$categ = $game_edit['categ'];
if($_FILES){
$name = $_POST['name'];
$text = $_POST['text'];
$image = $_FILES['orig']['name'];
$sl1 = $_FILES['sl1']['name'];
$sl2 = $_FILES['sl2']['name'];
$sl3 = $_FILES['sl3']['name'];
$background = $_FILES['back']['name'];
$back_color = $_POST['bg_color'];
$logo = $_FILES['logo']['name'];
$url = $_POST['url'];
if(isset($_POST['sub'])){
move_uploaded_file($_FILES['orig']['tmp_name'],"../image/game/game_img/".$image);
move_uploaded_file($_FILES['back']['tmp_name'],"../image/game/bg/".$background);
move_uploaded_file($_FILES['sl1']['tmp_name'],"../image/game/slider_game/".$sl1);
move_uploaded_file($_FILES['sl2']['tmp_name'],"../image/game/slider_game/".$sl2);
move_uploaded_file($_FILES['sl3']['tmp_name'],"../image/game/slider_game/".$sl3);
move_uploaded_file($_FILES['logo']['tmp_name'],"../image/game/slider_game/".$logo);
$admin->updategame($id,$name,$text,$image,$background,$back_color,$logo,$categ,$url);
}
}
}
Вот сам запрос:
function updategame($id,$name,$text,$image,$background,$back_color,$logo,$categ,$url){
$sql = mysqli_query($this->connect(), "UPDATE game SET name=$name ,desc=$text, image=$image,bg_game=$background,bg_color=$back_color,logo=$logo,categ=$categ,url=$url WHERE id=$id");
}