我想插入数据字段,例如:id=1,id_page=12356。我阅读id_page
了一个 html 文档,并且总是收到以下错误消息:
警告:mysql_query() 期望参数 1 是字符串,资源在 /mnt/webi/b0/44/53443744/htdocs/digitalpiano-test/kitareader.php 第 14 行错误中给出
<?php
$con = mysql_connect("rdbms.strato.de","U1363575","asdasd123","DB1363575");
if (mysqli_connect_errno())echo "Failed to connect to MySQL: " . mysqli_connect_error();
$name = file_get_contents('kitas.html'); $array_name = explode("<tr>", $name);
foreach($array_name as $value) {
$value2 = explode('<a href="kitaDetails.aspx?ID=',$value);
$value3 = explode('">',$value2[1]);
$id_page = $value3[0];
$eintragen = mysql_query($con,"INSERT INTO kita_berlin (id_page) VALUES ('$id_page')") or die ("error");
} ?>
怎么了?