0
@$c_matricula = $_POST['numero'];
@$data_aa = $_POST['data_aa'];
@$data_ff = $_POST['data_ff'];
if(isset($data_aa)){
@$dataa = date("Y-m-d H:i:s");
$pdo = $dbconn->prepare("UPDATE contato SET c_data_andamento = :data_a WHERE c_matricula = :c_matricula");
// $stmt->bindParam(':data_a', $data_a);
// $stmt->bindParam(':c_matricula', $c_matricula);
$pdo->execute();
// header("Location: listar_contato.php");
}
else
{
$pdo = $dbconn->prepare("UPDATE contato SET c_data_finalizado=:data_f WHERE c_matricula = :numero");
$pdo->execute();
I’m getting a post another page, if that post exist need to execute a query past the current date, otherwise I pass another query.
Erro:Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: no parameters were bound in C:\xampp\htdocs\programacao\avanco_contato.php on line 34
and what’s the problem?
– user76097
php bursts an error stating that the parameter is invalid
– Aprendizzz
who is
$data_a
? What’s line 34? Why thebindParam
are commented? In$stmt->bindParam(':data_a', $data_a)
is expected$data_a
that is missing from your code.– user76097