Created
April 20, 2012 11:57
-
-
Save Ocramius/2428021 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RROR | |
Warning: PDOStatement::bindParam(): SQLSTATE[HY093]: | |
Invalid parameter number: :cod_strum in /var/www/scelta_ins_conf.php on line 22 | |
Warning: PDOStatement::bindParam(): SQLSTATE[HY093]: | |
Invalid parameter number: :data_inc in /var/www/scelta_ins_conf.php on line 24 | |
Warning: PDOStatement::bindParam(): SQLSTATE[HY093]: | |
Invalid parameter number: :rilavato in /var/www/scelta_ins_conf.php on line 28 Warning: PDOStatement::bindParam(): SQLSTATE[HY093]: | |
Invalid parameter number: :inconveniente in /var/www/scelta_ins_conf.php on line 32 | |
Warning: PDOStatement::bindParam(): SQLSTATE[HY093]: | |
Invalid parameter number: :a_inc in /var/www/scelta_ins_conf.php on line 36 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST['p_inconvenienti'])){ | |
$data_inc=$_POST['data_inc']; | |
$i_ril=$_POST['i_ril']; | |
$inconveniente=$_POST['inconveniente']; | |
if (isset($_POST['a_inc'])) | |
$a_inc=$_POST['a_inc']; | |
else | |
$a_inc = "0"; | |
$sql_inc="INSERT INTO st_inconveniente(cod_strum, data_inc, rilavato, inconveniente, a_inc) VALUES (?, ?, ?, ?, ?)"; | |
$inc = $dbh->prepare($sql_inc); //imposto la query | |
$validator = new Zend_Validate_StringLength('min' >= 1); | |
$inc->bindParam(0, $_COOKIE["dbstrum_codstrum"], PDO::PARAM_INT); | |
if($validator->isValid($_POST['data_inc'])) | |
$inc->bindParam(1, $data_inc, PDO::PARAM_STR); | |
else | |
$inc->bindParam(1, $data_inc, PDO::NULL); | |
if($validator->isValid($_POST['i_ril'])) | |
$inc->bindParam(2, $i_ril, PDO::PARAM_STR); | |
else | |
$inc->bindParam(2, $i_ril, PDO::NULL); | |
if($validator->isValid($_POST['inconveniente'])) | |
$inc->bindParam(3, $inconveniente, PDO::PARAM_STR); | |
else{ | |
$inc->bindParam(3, $inconveniente, PDO::NULL); | |
} | |
$inc->bindParam('a_inc', $a_inc, PDO::PARAM_INT); | |
$inc ->execute(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment