oui je parlais de 1million
j'ai les erreures suivant :
Notice: Trying to get property of non-object in C:\wamp\www\Dashboard\test.php on line 54
Call Stack
# Time Memory Function Location
1 0.0013 386024 {main}( ) ..\test.php:0
( ! ) Notice: Trying to get property of non-object in C:\wamp\www\Dashboard\test.php on line 55
Call Stack
# Time Memory Function Location
1 0.0013 386024 {main}( ) ..\test.php:0
( ! ) Notice: Trying to get property of non-object in C:\wamp\www\Dashboard\test.php on line 56
Call Stack
# Time Memory Function Location
1 0.0013 386024 {main}( ) ..\test.php:0
( ! ) Notice: Trying to get property of non-object in C:\wamp\www\Dashboard\test.php on line 57
Call Stack
# Time Memory Function Location
1 0.0013 386024 {main}( ) ..\test.php:0
( ! ) Notice: Trying to get property of non-object in C:\wamp\www\Dashboard\test.php on line 58
Call Stack
# Time Memory Function Location
1 0.0013 386024 {main}( ) ..\test.php:0
( ! ) Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'txtStateFrom' cannot be null' in C:\wamp\www\Dashboard\test.php on line 59
( ! ) PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'txtStateFrom' cannot be null in C:\wamp\www\Dashboard\test.php on line 59
il aime pas
$prepare->bindValue(1,$data->txtstatefrom);
$prepare->bindValue(2,$data->txtstattto);
$prepare->bindValue(3,$data->txtdate);
$prepare->bindValue(4,$data->txtactionshort);
$prepare->bindValue(5,$data->txtparent);
aprament
<?php
set_time_limit(0);/*permet au script de s'éxécuter indéfiniment */
$dbname= 'merlin';
$user = 'root';
$password = '';
$host = 'localhost';
$connOdbc= new PDO('odbc:lotusreportsOpen', '', '');
//(table nomer frmHistoryLog)
$connecmysql = new PDO('mysql:host='.$host .';dbname='.$dbname, $user, $password );
// pour les 4 lignes qui suivent voir la doc <img src="http://forum.phpfrance.com/images/smilies/icon_wink.gif" alt=";)" title="Wink" />
$connecmysql->setAttribute ( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$connecmysql->setAttribute ( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ );
$connecmysql->setAttribute ( PDO::ATTR_EMULATE_PREPARES, false );
$connecmysql->setAttribute ( PDO::ATTR_CASE, PDO::CASE_LOWER );
$fields = "txtStateFrom,txtStateTo,txtDate,txtActionShort,txtParent";
$select = ' SELECT '.$fields .' FROM frmHistoryLog';
$insert = 'INSERT INTO historytest ('.$fields.') values(?,?,?,?,?) ';
$prepare = $connecmysql->prepare($insert);
$result = $connOdbc->query($select);
if($result === false){
$err = $result->errorInfo();
throw new Exception($err[2]);
}
while($data = $result->fetch()){
$prepare->bindValue(1,$data->txtstatefrom);
$prepare->bindValue(2,$data->txtstattto);
$prepare->bindValue(3,$data->txtdate);
$prepare->bindValue(4,$data->txtactionshort);
$prepare->bindValue(5,$data->txtparent);
$prepare->execute();
}
$result->closeCursor();
//Afficher le temps d'éxecution
$page_load_time = number_format($time, 3);
echo "Debut du script: ".date("H:i:s", $timestart);
echo "<br>Fin du script: ".date("H:i:s", $timeend);
echo "<br>Script execute en " . $page_load_time . " sec";
?>