A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 1

Filename: models/search_model.php

Line Number: 322

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/yachtsin/yachtsinmontenegro.com/system/core/Exceptions.php:185)

Filename: core/Common.php

Line Number: 442

Database Error

A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND B.iIdBase IN () AND LOWER(B.cShipyard) = '' AND B.iYearManufacture betwee...' at line 15

SELECT B.nId, B.cModel as name, LEFT(B.cDescrption, 500) as cDescrption, B.iYearManufacture, B.iLenght, B.iBerths, B.iBerthsAlt, B.cEngine, BF.cName as fuel, C.nId as company_id, C.cName as company, C.cAddress, AT.cName as advertising_type, BC.cName as boat_condition, BS.cName as base, CO.cName as country, IFNULL(min(B.nPrice), 0) as Price, IFNULL(min(B.nSpecialPrice), 0) as special_price, BCAT.cName as boat_category, BT.cName as boat_type, B.bVatIncluded as vat, B.iGoldPosition, case when BCAT.cName like '%Charter%' then 'Charter' else 'Sale' end as boat_general_category, I.cPath as ImagePath FROM (`boats` B) JOIN `companies` C ON `C`.`nId` = `B`.`iIdCompany` JOIN `advertising_types` AT ON `C`.`iIdAdvertisingType` = `AT`.`nId` JOIN `boat_fuel_types` BF ON `BF`.`nId` = `B`.`iIdFuel` JOIN `boat_conditions` BC ON `BC`.`nId` = `B`.`iIdCondition` JOIN `boat_categories` BCAT ON `BCAT`.`nId` = `B`.`iIdCategory` JOIN `boat_types` BT ON `BT`.`nId` = `B`.`iIdType` JOIN `bases` BS ON `BS`.`nId` = `B`.`iIdBase` JOIN `areas` AR ON `AR`.`nId` = `BS`.`iIdArea` JOIN `countries` CO ON `CO`.`nId` = `AR`.`iIdCountry` LEFT JOIN `boat_prices` BP ON `B`.`nId` = `BP`.`iIdBoat` LEFT JOIN `boat_images` BI ON `B`.`nId` = `BI`.`iIdBoat` and BI.iPosition = 1 LEFT JOIN `images` I ON `I`.`nId` = `BI`.`iIdImage` WHERE `BCAT`.`cName` like 'Sale%' AND B.iIdType = AND B.iIdBase IN () AND LOWER(B.cShipyard) = '' AND B.iYearManufacture between 0 and 1997 AND B.nPrice between 0 and 2000 AND B.iLenght between 0 and 5 AND B.iBerths between 0 and 2 GROUP BY `B`.`nId`, `B`.`cModel`, `B`.`cDescrption`, `B`.`iYearManufacture`, `B`.`iLenght`, `B`.`iBerths`, `B`.`iBerthsAlt`, `B`.`cEngine`, `BF`.`cName`, `C`.`nId`, `C`.`cName`, `C`.`cAddress`, `BC`.`cName`, `BS`.`cName`, `CO`.`cName`, `I`.`cPath`, `BCAT`.`cName`, `BT`.`cName`, `B`.`bVatIncluded`, `AT`.`cName`, `B`.`iGoldPosition`, `B`.`nSpecialPrice` ORDER BY `B`.`iGoldPosition` desc, ` LIMIT 10

Filename: /home/yachtsin/yachtsinmontenegro.com/models/search_model.php

Line Number: 335