我的sqlserver 是2016版本
$dbh = new \PDO("dblib:host=$hostname:$port ;dbname=$dbname", "$username", "$pw");
如果是这样
$stmt = $dbh->prepare("SELECT top 10 * FROM T_Biz_Goods ");
$stmt->execute();
while ($row = $stmt->fetch()) {
}
不会报错,
$stmt = $dbh->prepare("SELECT top 10 * FROM T_Biz_Goods where GdsId > 1000 ");
$stmt->execute();
while ($row = $stmt->fetch()) {
}
如果是这样,会报错
PDO_DBLIB: dbnextrow() returned FAIL
我的where这样写应该没错吧,为什么会这样
守着一只汪
蝴蝶不菲
随时随地看视频慕课网APP
相关分类