require_once '../class.user.php';
$user_home = new USER();
$lstmtf = $user_home->runQuery("DELETE a FROM answer AS a LEFT JOIN students_records AS s ON a.ARN = s.ARN WHERE s.ARN IS NULL LIMIT 10");
$lstmtf->execute();
LIMIT 无效,虽然它没有执行任何查询,但我无法找到我的错误。
UPDATE
我发现this comment很有帮助。那么,现在我的问题是:
有很多数据需要删除,但我想以多种方式删除(打破工作)。我正在使用:
require_once '../class.user.php';
$user_home = new USER();
$lstmtf = $user_home->runQuery("DELETE a FROM answer AS a LEFT JOIN students_records AS s ON a.ARN = s.ARN WHERE s.ARN IS NULL LIMIT 10");
$lstmtf->execute();
但是这个查询似乎没有正确执行查询。