读取MySQL表中数据出错
下面是一段工作正常的代码
/* 注入基本信息,A_I自动生成meta_id */<br />$query1 = "INSERT INTO libr_metacode (meta_isbn, meta_cip) VALUES ('$isbn', '$cip')";<br />$result1 = mysqli_query($dbc,$query1)<br /> or die('无法写入基本编码,错误信息:' . mysqli_error($dbc));<br /> <br />/* 获取meta_id进行后续写入 */<br />$query = "SELECT * FROM libr_metacode WHERE meta_isbn='$isbn'";<br />$result = mysqli_query($dbc, $query);<br />$row = mysqli_fetch_array($result);<br />$ida = $row['meta_id'];<br />echo '获得本书藏书库系统元编码' . $ida . '<br />';<br /> <br />/* 题名 */<br />$query2 = "INSERT INTO libr_title (meta_id, title, subtitle, series) VALUES ('$ida', '$title', '$subtitle', '$series')";<br />$result2 = mysqli_query($dbc,$query2)<br /> or die('无法写入题名信息,错误:' . mysqli_error($dbc));
/* 获取meta_id进行后续写入 */<br />$query = "SELECT * FROM '$ui_b' WHERE '$ui_c'='$ui_a'";<br />$result = mysqli_query($dbc, $query);<br />$row = mysqli_fetch_array($result);<br />$ida = $row['meta_id'];