<分区>
根据 http://us2.php.net/manual/en/mysqli-stmt.bind-param.php , 不同的类型是:
i corresponding variable has type integer
d corresponding variable has type double
s corresponding variable has type string
b corresponding variable is a blob and will be sent in packets
但是,你如何处理这个问题:
->prepare("SELECT blabla FROM foo WHERE id IN (?)")
在哪里?将是一个 ID 列表。可能有一项或多项:
$ids = "3,4,78";
->bind_param('s',$ids);
这可能吗?
我想使用准备好的语句,因为它会在循环中执行。