[STDERR] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in /var/www/vhosts/keciorenakkusnakliyat.com/httpdocs/inc/head.php:19
I can't find what's wrong in my code. Code snippet head.php:
<?php
include 'trex/controller/config.php';
include 'trex/controller/seo.php';
date_default_timezone_set('Europe/Istanbul');
$settings=$db->prepare("SELECT * from ayar where ayar_id=?");
$settings->execute(array(0));
$settingsprint=$settings->fetch(PDO::FETCH_ASSOC);
$social=$db->prepare("SELECT * from sosyal");
$social->execute();
$socialf=$db->prepare("SELECT * from sosyal");
$socialf->execute();
$socials=$db->prepare("SELECT * from sosyal");
$socials->execute();
$motor=$db->prepare("SELECT * from motor where motor_id=1");
$motor->execute(array(0));
$motorprint=$motor->fetch(PDO::FETCH_ASSOC);
$widgets=$db->prepare("SELECT * from widget where widget_id=1");
$widgets->execute(array(0));
$widgetprint=$widgets->fetch(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="trex/<?php echo $settingsprint['ayar_fav']; ?>"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.css">
<link rel="stylesheet" type="text/css" href="css/icomoon.css">
<link rel="stylesheet" href="css/rev-settings.css">
<link rel="stylesheet" type="text/css" href="css/swiper.min.css">
<link rel="stylesheet" type="text/css" href="css/slider.css">
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" type="text/css" href="css/switcher.css">
<link rel="stylesheet" href="css/owl.carousel.css">
<link rel="stylesheet" type="text/css" href="css/default.css">
<link rel="stylesheet" type="text/css" href="css/styles.css" id="colors">
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:100,200,300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="css/lightbox.css">
<link href="trex/assets/lib/sweet-alerts2/sweetalert2.min.css" rel="stylesheet">
<?php
echo $motorprint['motor_yonay'];
echo $motorprint['motor_gonay'];
?>
Error :
In DB
i don't know what is the problem ??