2016-01-20 114 views
0

我有一个这样的时刻,在我的MySQL中必须有一个简单的错误,但我无法找到它!我尝试了一个在线语法检查器,但它没有帮助,我似乎无法识别错误。这个MySQL'insert'语句有什么问题?

我得到的错误是:

'您的SQL语法错误;检查 对应于你的MySQL服务器版本正确的语法使用 附近 'property_ground_rent,property_ground_rent_unit, property_ground_rent_vat,prope'

$property_sql="INSERT INTO property (
property_token, 
property_availability, 
property_auction, 
property_status, 
property_category, 
property_type, 
property_apartment_number_name, 
property_number_name, 
property_address_line_1, 
property_address_line_2, 
property_suburb, 
property_town_city, 
property_postcode, 
property_country, 
property_display_address, 
property_epc_rating, 
property_local_authority, 
property_council_tax_band, 
property_rateable_value, 
property_no_bedrooms, 
property_no_bathrooms, 
property_no_receptions, 
property_no_outbuildings, 
property_no_floors, 
property_entrance_floor, 
property_new_build, 
property_condition, 
property_tenure_type, 
property_leasehold_date, 
property_leasehold_term, 
property_year_built, 
property_living_space, 
property_living_space_unit, 
property_land_size, 
property_land_size_unit, 
property_summary, 
property_description, 
property_commercial_price_per_unit_area, 
property_service_charge, 
property_service_charge_unit, 
property_service_charge_vat, 
property_insurance, 
property_insurance_unit, 
property_insurance_vat 
property_ground_rent, 
property_ground_rent_unit, 
property_ground_rent_vat, 
property_commercial_business_for_sale, 
property_price, 
property_price_vat, 
property_price_qualifier, 
property_letting_rent_frequency, 
property_letting_deposit, 
property_contract_type, 
property_letting_student, 
property_letting_share, 
property_letting_minimum_term, 
property_letting_contract_term, 
property_letting_term_type, 
property_letting_available_from, 
property_letting_furnished_status, 
property_letting_lha, 
property_letting_pets, 
property_letting_smoking, 
property_letting_sharers, 
property_letting_burglar_alarm, 
property_letting_tenant_fees, 
property_date_created, 
property_date_updated, 
property_created_by, 
property_updated_by, 
property_parking_spaces, 
property_letting_type, 
property_letting_service, 
property_letting_tenancy_renewal_fee, 
property_account_manager, 
property_branch, 
property_tenant_find_fee, 
property_management_fee, 
property_tenant_find_fee_type, 
property_management_fee_type, 
property_sole_sale_fee, 
property_multi_sale_fee, 
property_sole_sale_fee_type, 
property_multi_sale_fee_type, 
property_letting_all_bills_included, 
property_letting_water_bill, 
property_letting_gas_bill, 
property_letting_electricity_bill, 
property_letting_oil_bill, 
property_letting_council_tax, 
property_letting_tv_licence, 
property_letting_sat_cable_tv_bill, 
property_letting_internet_bill, 
property_letting_telephone_bill, 
property_letting_service_charge, 
property_letting_ground_rent, 
property_mains_gas_supply, 
property_viewing_arrangement, 
property_viewing_arrangement_notes, 
property_keys_location, 
property_lll_status, 
property_latitude, 
property_longitude, 
property_notes 
) 
VALUES (
'" . generateRandomString(40) . "', 
'$property_availability', 
'$property_auction', 
'$property_status', 
'$property_category', 
'$property_type', 
'$property_apartment_number_name', 
'$property_number_name', 
'$property_address_line_1', 
'$property_address_line_2', 
'$property_suburb', 
'$property_town_city', 
'$property_postcode', 
'$property_country', 
'$property_display_address', 
'$property_epc_rating', 
'$property_local_authority', 
'$property_council_tax_band', 
'$property_rateable_value', 
'$property_no_bedrooms', 
'$property_no_bathrooms', 
'$property_no_receptions', 
'$property_no_outbuildings', 
'$property_no_floors', 
'$property_entrance_floor', 
'$property_new_build', 
'$property_condition', 
'$property_tenure_type', 
'$property_leasehold_date', 
'$property_leasehold_term', 
'$property_year_built', 
'$property_living_space', 
'$property_living_space_unit', 
'$property_land_size', 
'$property_land_size_unit', 
'$property_summary', 
'$property_description', 
'$property_commercial_price_per_unit_area', 
'$property_service_charge', 
'$property_service_charge_unit', 
'$property_service_charge_vat', 
'$property_insurance', 
'$property_insurance_unit', 
'$property_insurance_vat', 
'$property_ground_rent', 
'$property_ground_rent_unit', 
'$property_ground_rent_vat', 
'$property_commercial_business_for_sale', 
'$property_price', 
'$property_price_vat', 
'$property_price_qualifier', 
'$property_letting_rent_frequency', 
'$property_letting_deposit', 
'$property_contract_type', 
'$property_letting_student', 
'$property_letting_share', 
'$property_letting_minimum_term', 
'$property_letting_contract_term', 
'$property_letting_term_type', 
'$property_letting_available_from', 
'$property_letting_furnished_status', 
'$property_letting_lha', 
'$property_letting_pets', 
'$property_letting_smoking', 
'$property_letting_sharers', 
'$property_letting_burglar_alarm', 
'$property_letting_tenant_fees', 
'$property_date_created', 
'$property_date_updated', 
'$property_created_by', 
'$property_updated_by', 
'$property_parking_spaces', 
'$property_letting_type', 
'$property_letting_service', 
'$property_letting_tenancy_renewal_fee', 
'$property_account_manager', 
'$property_branch', 
'$property_tenant_find_fee', 
'$property_management_fee', 
'$property_tenant_find_fee_type', 
'$property_management_fee_type', 
'$property_sole_sale_fee', 
'$property_multi_sale_fee', 
'$property_sole_sale_fee_type', 
'$property_multi_sale_fee_type', 
'$property_letting_all_bills_included', 
'$property_letting_water_bill', 
'$property_letting_gas_bill', 
'$property_letting_electricity_bill', 
'$property_letting_oil_bill', 
'$property_letting_council_tax', 
'$property_letting_tv_licence', 
'$property_letting_sat_cable_tv_bill', 
'$property_letting_internet_bill', 
'$property_letting_telephone_bill', 
'$property_letting_service_charge', 
'$property_letting_ground_rent', 
'$property_mains_gas_supply', 
'$property_viewing_arrangement', 
'$property_viewing_arrangement_notes', 
'$property_keys_location', 
'$property_lll_status', 
'$property_latitude', 
'$property_longitude', 
'$property_notes' 
)"; 
+1

您错过了'',''property_ground_rent'之前的'''''''''''' –

+1

现在你有了答案,你应该删除这个问题。 Typo问题对未来的网站使用没有好处 – 2016-01-20 11:51:37

回答

3

你错过了一个逗号,property_insurance_vat

$property_sql="INSERT INTO property (
property_token, 
property_availability, 
property_auction, 
property_status, 
property_category, 
property_type, 
property_apartment_number_name, 
property_number_name, 
property_address_line_1, 
property_address_line_2, 
property_suburb, 
property_town_city, 
property_postcode, 
property_country, 
property_display_address, 
property_epc_rating, 
property_local_authority, 
property_council_tax_band, 
property_rateable_value, 
property_no_bedrooms, 
property_no_bathrooms, 
property_no_receptions, 
property_no_outbuildings, 
property_no_floors, 
property_entrance_floor, 
property_new_build, 
property_condition, 
property_tenure_type, 
property_leasehold_date, 
property_leasehold_term, 
property_year_built, 
property_living_space, 
property_living_space_unit, 
property_land_size, 
property_land_size_unit, 
property_summary, 
property_description, 
property_commercial_price_per_unit_area, 
property_service_charge, 
property_service_charge_unit, 
property_service_charge_vat, 
property_insurance, 
property_insurance_unit, 
property_insurance_vat, //------------>You missed comma 
property_ground_rent, 
property_ground_rent_unit, 
property_ground_rent_vat, 
property_commercial_business_for_sale, 
property_price, 
property_price_vat, 
property_price_qualifier, 
property_letting_rent_frequency, 
property_letting_deposit, 
property_contract_type, 
property_letting_student, 
property_letting_share, 
property_letting_minimum_term, 
property_letting_contract_term, 
property_letting_term_type, 
property_letting_available_from, 
property_letting_furnished_status, 
property_letting_lha, 
property_letting_pets, 
property_letting_smoking, 
property_letting_sharers, 
property_letting_burglar_alarm, 
property_letting_tenant_fees, 
property_date_created, 
property_date_updated, 
property_created_by, 
property_updated_by, 
property_parking_spaces, 
property_letting_type, 
property_letting_service, 
property_letting_tenancy_renewal_fee, 
property_account_manager, 
property_branch, 
property_tenant_find_fee, 
property_management_fee, 
property_tenant_find_fee_type, 
property_management_fee_type, 
property_sole_sale_fee, 
property_multi_sale_fee, 
property_sole_sale_fee_type, 
property_multi_sale_fee_type, 
property_letting_all_bills_included, 
property_letting_water_bill, 
property_letting_gas_bill, 
property_letting_electricity_bill, 
property_letting_oil_bill, 
property_letting_council_tax, 
property_letting_tv_licence, 
property_letting_sat_cable_tv_bill, 
property_letting_internet_bill, 
property_letting_telephone_bill, 
property_letting_service_charge, 
property_letting_ground_rent, 
property_mains_gas_supply, 
property_viewing_arrangement, 
property_viewing_arrangement_notes, 
property_keys_location, 
property_lll_status, 
property_latitude, 
property_longitude, 
property_notes 
) 
VALUES (
'" . generateRandomString(40) . "', 
'$property_availability', 
'$property_auction', 
'$property_status', 
'$property_category', 
'$property_type', 
'$property_apartment_number_name', 
'$property_number_name', 
'$property_address_line_1', 
'$property_address_line_2', 
'$property_suburb', 
'$property_town_city', 
'$property_postcode', 
'$property_country', 
'$property_display_address', 
'$property_epc_rating', 
'$property_local_authority', 
'$property_council_tax_band', 
'$property_rateable_value', 
'$property_no_bedrooms', 
'$property_no_bathrooms', 
'$property_no_receptions', 
'$property_no_outbuildings', 
'$property_no_floors', 
'$property_entrance_floor', 
'$property_new_build', 
'$property_condition', 
'$property_tenure_type', 
'$property_leasehold_date', 
'$property_leasehold_term', 
'$property_year_built', 
'$property_living_space', 
'$property_living_space_unit', 
'$property_land_size', 
'$property_land_size_unit', 
'$property_summary', 
'$property_description', 
'$property_commercial_price_per_unit_area', 
'$property_service_charge', 
'$property_service_charge_unit', 
'$property_service_charge_vat', 
'$property_insurance', 
'$property_insurance_unit', 
'$property_insurance_vat', 
'$property_ground_rent', 
'$property_ground_rent_unit', 
'$property_ground_rent_vat', 
'$property_commercial_business_for_sale', 
'$property_price', 
'$property_price_vat', 
'$property_price_qualifier', 
'$property_letting_rent_frequency', 
'$property_letting_deposit', 
'$property_contract_type', 
'$property_letting_student', 
'$property_letting_share', 
'$property_letting_minimum_term', 
'$property_letting_contract_term', 
'$property_letting_term_type', 
'$property_letting_available_from', 
'$property_letting_furnished_status', 
'$property_letting_lha', 
'$property_letting_pets', 
'$property_letting_smoking', 
'$property_letting_sharers', 
'$property_letting_burglar_alarm', 
'$property_letting_tenant_fees', 
'$property_date_created', 
'$property_date_updated', 
'$property_created_by', 
'$property_updated_by', 
'$property_parking_spaces', 
'$property_letting_type', 
'$property_letting_service', 
'$property_letting_tenancy_renewal_fee', 
'$property_account_manager', 
'$property_branch', 
'$property_tenant_find_fee', 
'$property_management_fee', 
'$property_tenant_find_fee_type', 
'$property_management_fee_type', 
'$property_sole_sale_fee', 
'$property_multi_sale_fee', 
'$property_sole_sale_fee_type', 
'$property_multi_sale_fee_type', 
'$property_letting_all_bills_included', 
'$property_letting_water_bill', 
'$property_letting_gas_bill', 
'$property_letting_electricity_bill', 
'$property_letting_oil_bill', 
'$property_letting_council_tax', 
'$property_letting_tv_licence', 
'$property_letting_sat_cable_tv_bill', 
'$property_letting_internet_bill', 
'$property_letting_telephone_bill', 
'$property_letting_service_charge', 
'$property_letting_ground_rent', 
'$property_mains_gas_supply', 
'$property_viewing_arrangement', 
'$property_viewing_arrangement_notes', 
'$property_keys_location', 
'$property_lll_status', 
'$property_latitude', 
'$property_longitude', 
'$property_notes' 
)"; 
后的手册
+0

老虎眼 –

+0

@VictorViola;)感谢您的评论 – AnkiiG

+0

谢谢!我会接受我什么时候可以 –