$sql="SELECT qno FROM `cia1questions` ";
$result = $mysqli ->query($sql);
$counter = mysqli_num_rows($result);
$createnew="CREATE table cia1markstest(
Reg_no INT[12] primary key,
st_name varchar[50] not null";
$createnew1="";
if($counter>0)
{
for($i = 0; $i < $counter; $i++){
$row=$result->fetch_assoc();
$createnew1.",".$row['qno']." INT[3]";
}
}
$createnew1.")";
echo $createnew.$createnew1;
$re=$mysqli->query($createnew.$createnew1);
这无法创建新表。我怎样才能解决这个问题?当我回显输出sql字符串时,仅正在读取createnew字符串。有人可以帮忙吗?