我正在使用 PHP-MySQLi-Database-Class (MysqliDb.php)。
我有这个查询,但 Wamp 说:
致命错误:准备查询时出现问题
SELECT car_id FROM gm_cars WHERE car_id NOT IN
(
SELECT reserve_car_id FROM gm_reservations
WHERE reserve_dropOff > ? AND reserve_dropOff = ? AND reserve_pickUp )
Erreur de syntaxe près de '' à la ligne 1 在
C:\wamp\www\work\libs\PHP-MySQLi-Database-Class-master\MysqliDb.php
第 823 行
查询:连接数据库
>$carsBetweenDates = $db->rawQuery
('SELECT car_id FROM gm_cars WHERE car_id NOT IN
(SELECT reserve_car_id FROM gm_reservations
WHERE reserve_dropOff > ? AND reserve_dropOff <= ?
UNION
DISTINCT SELECT reserve_car_id FROM gm_reservations
WHERE reserve_pickUp >= ? AND reserve_pickUp < ?)',
Array('2014-12-20 20:00:00', '2014-12-22 20:00:00',
'2014-12-20 20:00:00', '2014-12-22 20:00:00'));
我没有看到错误。非常感谢。对不起我的英语不好。