我正在编写一个函数,通过读取表结构向所有表添加记录,然后提交两个变量$params
和$data
。
$params
可能是ssssssssssssss
$data
将为="$Email, $First, $Surname, $Group_ID, $city, $bdFlag, $Sector, $Telephone, $createJobs, $artworker, $Password, $currentPass, $enteredBY, $Created"
如果我使用下面的声明,它可以正常工作。但是我不能用'$ data'变量替换field变量。有谁知道我怎么能做到这一点?
// This works
$stmt->bind_param($params , $Email, $First, $Surname, $Group_ID, $city, $bdFlag, $Sector, $Telephone, $createJobs, $artworker, $Password, $currentPass, $enteredBY, $Created);
// This doesn't
$stmt->bind_param($params , $data);