I have a PHP code to save data in MySQL. I am using PDO connection.
$Stmt = $con->prepare($query);
$Stmt->bindParam(1,101,PDO::PARAM_INT,10);
$Stmt->bindParam(2,'Hello World!',PDO::PARAM_STR,300);
$Stmt->execute();
When I run the code, getting exception as
PHP Fatal error: Cannot pass parameter 2 by reference