我在使用PDO运行查询时遇到问题
$sql = 'SELECT * FROM domains WHERE (pagerank >= :pageRank OR pagerank IS NULL) AND join_by_date >= :fromDate AND join_by_date <= :future_date ORDER BY join_by_date ASC, alexa_rank ASC LIMIT :offset, :limit';
$response = $connection->prepare($sql);
$response->execute(array(':pageRank' => $minPagerank, ':fromDate' => $fromDate, ':future_date' => $future_date, ':offset' => (int)$offset, ':limit' => (int)$resultsPerPage));
启用查询日志时生成的查询显示限制和偏移变量周围的引号。如果我不绑定这些参数,则查询将按预期工作。
不确定我是否误解了PDO或输入错误:/任何帮助赞赏