Problem :
I am facing the error as SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 102 in comments.php below:
<?php
/**
* Class to handle the articles
*/
class Comment
{
// The Properties
/**
* @var int The article ID from your database
*/
public $id = null;
/**
* @var int When your article is to be / was first published
*/
public $publicationDate = null;
/**
* @var string Full title of your article
*/
public $title = null;
/**
* @var string The HTML content of your article
*/
public $content = null;
/**
* @var int The article ID from your database
*/
public $articleid = null;
/**
* Sets the object's properties using your values in the supplied array
*
* @param assoc your property values
*/
public function __construct( $data=array() ) {
if ( isset( $data['id'] ) ) $this->id = (int) $data['id'];
if ( isset( $data['publicationDate'] ) ) $this->publicationDate = (int) $data['publicationDate'];
if ( isset( $data['title'] ) ) $this->title = preg_replace ( "/[^\.\,\-\_\'\"\@\?\!\:\$ a-zA-Z0-9()]/", "", $data['title'] );
if ( isset( $data['content'] ) ) $this->content = $data['content'];
if ( isset( $data['articleid'] ) ) $this->articleid = (int) $data['articleid'];
}
.
.
.