$stmt = $mysqli->prepare("SELECT vin FROM jobs WHERE out between ? and ?");
$stmt->bind_param('ss', $startday, $endday);
$startday = '2013-01-01';
$endday = '2013-12-31';
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($vin);
echo $vin;
如果我删除了语句的中间部分,上面的代码会发出这个错误查询工作。我尝试将列名括在括号中,但这也会杀死查询,所以我不得不删除它们。似乎问题出在 between 子句上,我可能不知道如何使用它。请帮忙
Fatal error: Call to a member function bind_param() on a non-object