查询表达式中的语法错误(缺少运算符)

时间:2011-03-20 17:53:20

标签: php ms-access com

我已经查看了这个问题的其他答案,但没有一个符合该法案。

我收到此错误:

Syntax error (missing operator) in query expression ↲
''<span style=\"line-height: 115%; font-family: \'Verdana\',\'sans-serif\'; ↲
font-size: 7.5pt; mso-ansi-language: TR; mso-fareast-font-family: Calibri; ↲
mso-fareast-theme-font: minor-latin; mso-bidi-font-family: \'Times New Roman\'; ↲
mso-bidi-theme-font: mino'

编辑以下是查询

    INSERT INTO the_table (`Kimlik`, `OBJECT_NR`, `pshow`, `rent`, `best`, `pname`,
 `oda1`, `oda2`, `oda3`, `oda4`, `oda5`, `oda6`, `odap`, `lsnr`, `rentg`, `detayb`,
 `ptitle`, `linkno`, `ptype`, `ptip2`, `location`, `stor`, `durum`, `oda`, `plistele`,
 `size`, `fiyat`, `fbasla`, `tocity`, `tosea`, `toair`, `tobus`, `toshop`, `togolf`,
 `topool`, `tomountain`, `tofitness`, `tosauna`, `balkon`, `yil`, `bath`, `pool`, 
`pdetail`, `360`, `plist`, `pmainpic`, `res1`, `res2`, `res3`, `keyword`, `desc`,
 `phomepage`, `ploc`, `pprint`, `tarih`, `video`, `pricerange`, `searange`) VALUES 
('null', 900, 'TRUE', 'FALSE', 'FALSE', 'LRT - ANT900', 'TRUE', 'TRUE', 'FALSE', 'FALSE', 
'FALSE', 'FALSE', 'FALSE', 'Konyaalti', '', 'Newly launched off plan development in 
Antalya', 'Newly launched off plan development in Antalya, Antalya Property, Property 
Turkey', 'turkey-property-in-antalya/Newly-launched-off-plan-development-in-Antalya-900.html', 'Apartments', '', 'Antalya', 5, 'Off Plan', 1, 'Newly launched holiday 
development in Antalya, superb investment opportunity, very affordable prices in complex
 with many facilities', '60 sqm', 37000, 'From', '10 mins', '10 mins', '30 mins', 
'walking', 'walking', '45 mins', 'TRUE', 'TRUE', 'TRUE', 'TRUE', 'Yes', 2011, 1, '', ' <p>
 Off-plan Antalya Konyalti Apartments, Special Price. </p> <p> New modern complex located
 in the investment area Konyaalti near Blue Flag beaches. Offering hotel facilities this 
property is perfect for investment or holiday home and has rental potential.<br /> The 
complex consists of 2 residential blocks. There is a large pool with children\'s section,
 a water slide for children, children\'s playground, garden, sauna, and fitness room. The
 complex provides 24 hour security and parking facilities for residents. Total area is 3.000m2. Distance to the beach - 1.200m. The complex is located close to Migros, Beach 
Park, Dolphin land.<br /> <br /> <br /> </p> <p style=\"line-height: 150%; background:
 white; margin-left: 36pt\"> Completed date 11/2011, 1 year instalment payment plan<br />
 <br /> Konyaalti is a very popular, welcoming and pleasant area of Antalya. Situated on 
the west of the town, and only 20 minutes from Antalya International Airport. The small 
and fairly quiet suburb of Antalya has a long promenade and beach, with the beautiful 
Taurus mountains as a background scenery. There is very close to hand a good selection of 
shops bars and restaurants, whilst a little further afield are the bigger shopping malls and entertainment parks. The antique harbour of Antalya is also a short distance away </p>
 ', '', '-', '100.jpg', 'Select', '', 'Investment, Holiday, Mountain', 'Real Estate in 
Antalya, Antalya Property, Property in Antalya, Property Antalya', 'Newly launched holiday 
development in Antalya, superb investment opportunity, very affordable prices in complex 
with many facilities from 37000 €', 99, 'Select', '-', '', '', '35.000-40.000', 1.000)

    Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft
 JET Database Engine<br/><b>Description:</b> Syntax error (missing operator) in query 
expression '' <p> Off-plan Antalya Konyalti Apartments, Special Price. </p> <p> New modern 
complex located in the investment area Konyaalti near Blue Flag beaches. Offering hotel
 facilities this property is perfect for investment or holiday home and has rental '.' 

2 个答案:

答案 0 :(得分:0)

我假设html源代码中的某些字符会破坏您的SQL查询。

  • 检查您的SQL查询是否完整。
  • 将所有'和'替换为\'和\“
  • 检查查询中的额外引号,我在开头看到:''

  • 如果可能在您的浏览器(或msgbox)中输出完整的查询并在phpmyadmin中尝试查询,phpmyadmin将显示更好的错误消息,以便您可能知道最新情况;)但我看到您正在使用访问权限

答案 1 :(得分:0)

访问在您拥有的两个位置窒息

children\'s

将这些更改为

children''s

(两个单引号)和Access应该很高兴。