我试着把今天所有的预订都拉出来,但是我遇到了最后一行的语法错误。
SELECT
booking.BookingID, booking.CustID, booking.CostID, booking.DateOut,
customer.Fname, customer.Sname, costume.Description, costume.Size
FROM
booking
INNER JOIN
customer ON booking.CustID = customer.CustID
INNER JOIN
costume ON booking.CostID = costume.CostID
WHERE
booking.DateOut = Date();
感谢任何帮助!
错误消息:
#1064-您的SQL语法有错误;请查看与MySQL服务器版本相对应的手册,以获取在''附近使用的正确语法)
限制0,25'在第7行
最佳答案
SELECT
booking.BookingID, booking.CustID, booking.CostID, booking.DateOut,
customer.Fname, customer.Sname, costume.Description, costume.Size
FROM
booking
INNER JOIN
customer ON booking.CustID = customer.CustID
INNER JOIN
costume ON booking.CostID = costume.CostID
WHERE
booking.DateOut = CURDATE();