I am trying to decrypt a value after a where statement looking like this below
$sqlz = $this->conn-> prepare("SELECT * FROM registration WHERE
CAST(AES_DECRYPT('email', '$tknz') AS CHAR) = ?");
$sqlz-> bindValue(1,$email, PDO::PARAM_STR);
$sqlz -> execute();
$rowz = $sqlz->fetch(PDO::FETCH_ASSOC);
But every time I try to run this section I get the below error
Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ErKhCAqKCgMIte802cqBHdTH0YxKhlWDXo4cYoDCZLPnWtZWdIZAlu1dMcpD3q7M012UwUbzzGhwXrxGasg78EDJIXVXDcdYSXo0rX8wNGhgOQgx6KQgwVQhubuCwJQW5ZozNpNR3qHgIbhTswSMzQYaUTjp0xJS5Kgvw9sz8LIAU1Dg7zSR0HnWL2P6UcVH' in 'field list'
What I'm missing or not doing?