我想检查一下名为' BUC test'已经在数据库中,但突然我的$stmt->execute();
无效
$cek_name=mysql_num_rows(mysql_query("SELECT name FROM equipment WHERE id='$_GET[bie]' and name='BUC test'"));
if ($cek_name > 0)
{
$duplicate = "Equipment Name is already in use.";
}
else
{
echo 'this will execute';
$stmt1->bind_param('ssssss',$id,$type, $name, $qty, $usd, $idr);
$stmt1->execute();
}
$type = 'BUC';
$name = 'BUC test';
$qty = '1';
$usd = '0';
$idr = '0';
$id= $_GET['bie'];
如果我把$stmt->execute();
放在外面,如果它的工作还有,那么有没有人有线索?
fyi:显示echo 'this will execute';
。
请帮忙!谢谢!