Search the Community
Showing results for tags 'pdoexception'.
-
Exception: PDOException: SQLSTATE[HY093]: Invalid parameter number in *.php:1732 Stack trace: #0 *.php(1732): PDOStatement->execute(Array) #1 crm_for.php(23): *->crm(0, 1, Array) #2 *.php(1): require_once('/var/www/html/C...') #3 {main} Hello fellow people, i need a rant. An error is appearing in my new CRM system. there are No Numeric values in transfer on the pdo statement but the compiler isn't on my side. the following SQL Statement is for concating an intitated Null value in the CRM table i have a workaround but its inefficiant and dataconsuming. I would like to estimate if there is an null value and overrite it with general text for later sentiment analysis. Error throwing Code: try { $sql = $this->Db->prepare("UPDATE *** SET data =(CASE WHEN (NULL) THEN :f ELSE (CONCAT(data,:f)) END) WHERE lead=:e"); $preset = array(':e' => $data["lead"], ':f' => $data["comment"] . $data["text"]); $sql->execute(array(':e' => $data["lead"], ':f' => $data["comment"] . $data["text"])); } catch (PDOException $e) { $this->report("crm_err: " . $e); return $e . " Fehler bei migration in die Datenbank, bitte informieren Sie einen Administrator." . $current_date_frep; } return "Ihr Text wurde erfolgreich in die Datenbank migriert, weiter so!" . var_dump($preset); break; Initiating Code: echo *->crm(0,1,array('lead' => "account", 'comment' => "send:",'text' => "text")) . "<br>"; echo *->crm(0,1,array('lead' => "account", 'comment' => "recv:",'text' => "text")) . "<br>";