whine: XML in mySQL einlesen - Performanceproblem

Beitrag lesen

Hallo dedlfix,

nu hab ich mal alles nach prozedualem und OO-Stil versucht, aber immer noch ohne Erfolg:

$link = mysqli_connect($host, $user, $pw, $db_name);  
	  
/* check connection */  
if (mysqli_connect_errno()) {  
    printf("Connect failed: %s\n", mysqli_connect_error());  
    exit();  
}  
/* create a prepared statement */  
   if ($stmt = mysqli_prepare($link, "INSERT INTO test_tbl  
	   (id,  
	    ".$xml->{"ChannelInfo1"}->Name.",  
	    ".$xml->{"ChannelInfo2"}->Name.") VALUES  
  
		(?, ?, ?)")) {  
  
for ($i=1; $i <= $xml->Values; $i++) {  
  
/* bind parameters for markers */  
mysqli_stmt_bind_param($id, $xml->{"M$i"}->{"Ch1"}, $xml->{"M$i"}->{"Ch2"});  
mysqli_error();  
  
/* execute query */  
mysqli_stmt_execute($stmt);  
  
/* close statement */  
mysqli_stmt_close($stmt);	  
  
	  
}  
}  
mysqli_close($link);