$statement = $database->prepare('INSERT INTO favorite_category (id_users, category_id) values(:id, :category_id)'); $id = 3; $categoryID = 10; $statement->bindParam(':id', $id); $statement->bindParam(':category_id', $categoryID); $statement->execute(); $statement->bindValue(':id', 3); $statement->bindValue(':category_id', 10); $statement->execute(); bindParam()は変数を入れないとエラーが出る。bindValue()は値を直接入れても、