问题描述
|
我的准备陈述书有误
$sqlst = $dbh->prepare(\'SELECT * FROM starter_trot WHERE UserId = 2345\' ) or die \"Couldn\'t prepare statement: \" . $dbh->errstr;
$sqlst->execute($userid) or die \"Couldn\'t execute statement: \" . $sqlst->errstr;
my @data;
print\"hai\";
while (@data = $sqlst->fetchrow_array())
{
print \"**\";
}
execute语句和prepare语句肯定不会失败。
[WHERE UserId = 2345]这是它失败的部分。当我在数据库中运行查询时,它会重新调整值。但是当我通过脚本运行查询时,它会失败(但没有编译或运行时问题),这是什么问题。在准备中,我们必须给出?(绑定变量而不是实际值?)
〜
〜
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)