PDO and bindParam Issue
Ok, so here is my code ...

    public function insert_cover($title, $description, $category_id, $filename)
	{
		if($this->category_exists($category_id)) {
			$sth = $this->con->prepare('
				INSERT INTO cover
				(id, title, description, image, category_id, timestamp)
				VALUES
				(null, :title, :description, :image, :category_id, null)
			');
			
			$sth->bindParam(':title', $title, PDO::PARAM_STR);
			$sth->bindParam(':description', $description, PDO::PARAM_STR);
			$sth->bindParam(':image', $filename);
			$sth->bindParam('::category_id',  $category_id, PDO::PARAM_INT);
			
			$sth->execute();
			
			return true;
		} else {
			return false;
		}
	}

And here is my error:

    Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in /MAMP/htdocs/*****/lib/DB.class.php on line 44

It works fine if I don't use `bindParam` and add an array of key => value pairs to `execute()`

Any ideas what's going on here?
PDO and bindParam Issue
===

Ok, so here is my code ...

    public function insert_cover($title, $description, $category_id, $filename)
	{
		if($this->category_exists($category_id)) {
			$sth = $this->con->prepare('
				INSERT INTO cover
				(id, title, description, image, category_id, timestamp)
				VALUES
				(null, :title, :description, :image, :category_id, null)
			');
			
			$sth->bindParam(':title', $title, PDO::PARAM_STR);
			$sth->bindParam(':description', $description, PDO::PARAM_STR);
			$sth->bindParam(':image', $filename);
			$sth->bindParam('::category_id',  $category_id, PDO::PARAM_INT);
			
			$sth->execute();
			
			return true;
		} else {
			return false;
		}
	}

And here is my error:

    Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in /MAMP/htdocs/*****/lib/DB.class.php on line 44

It works fine if I don't use `bindParam` and add an array of key => value pairs to `execute()`

Any ideas what's going on here?