Solution to Fatal error : Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number in - PHP

The Code: // Count status comments $retval1_comment = $dbconnect->query('SELECT count(id) FROM fr_status_comment WHERE status_id = '.$status_id); $retval1_comment->execute(array(':status_id' => $status_id)); The Solution: Remove $retval1_comment->execute(array(':status_id' => $status_id));

Post a comment

0 Comments