Query =
SELECT
room_prices.rowid as IDprice,
room_prices.roomid,
room_prices.seasonid,
room_prices.rooms,
room_prices.price,
room_hotels.hotelid,
room_hotels.rowid as hotelid,
room_hotels.typeid,
room_hotels.description,
room_hotels.extrainfo,
room_seasons.seasonfrom,
room_seasons.seasonto,
room_seasons.sfrom,
room_seasons.sto,
room_types.packs,
room_types.type_code
FROM
room_types
INNER JOIN room_hotels ON (room_types.roomtypeid = room_hotels.typeid)
INNER JOIN room_prices ON (room_hotels.rowid = room_prices.roomid)
INNER JOIN room_seasons ON (room_prices.seasonid = room_seasons.seasonid)
WHERE
(room_seasons.hotelid = ) AND
(room_seasons.seasonfrom<>'' OR room_seasons.seasonfrom<>'0000-00-00' OR room_seasons.seasonfrom is NOT NULL) AND
(room_prices.price >= 0 )
ORDER BY
room_hotels.rate,
room_types.packs,
room_hotels.rowid,
room_prices.seasonid
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND
(room_seasons.seasonfrom<>'' OR room_seasons.seasonfrom<>'0000-00-00' OR' at line 24