如何使用mysqli_stmt_bind_param插入多个表?

时间:2019-06-12 03:36:27

标签: php mysqli

我正在尝试将file_id插入文件表,并将file_desc插入file_list表。该代码有错误

$query = "INSERT INTO file(file_id) VALUES(?); INSERT INTO file_list(file_desc) VALUES (?);";
$stmt  = mysqli_prepare($dbConn,$query);

如何使它们插入2个不同的表中?

mysqli_stmt_bind_param($stmt, "ss", $f_id, $f_desc);
mysqli_stmt_execute($stmt);

这是错误。 警告:mysqli_stmt_bind_param()期望参数1为mysqli_stmt,布尔值在第30行的C:\ xampp \ htdocs \ unithasil_FileManagementSystem \ fileAdded.php中给出

0 个答案:

没有答案
相关问题