我在下面有这个JSON(例如):
[
{
"model_id": "437",
"model_make_id": "alfa-romeo",
"model_name": "147",
"model_trim": "1.6 Progression",
"model_year": "2008",
"model_body": null,
"model_engine_position": "Front",
"model_engine_cc": "1597",
"model_engine_cyl": "4",
"model_engine_type": "in-line",
"model_engine_valves_per_cyl": "4",
"model_engine_power_ps": "120",
"model_engine_power_rpm": "4200",
"model_engine_torque_nm": "146",
"model_engine_torque_rpm": "4200",
"model_engine_bore_mm": "82.0",
"model_engine_stroke_mm": "75.7",
"model_engine_compression": "10.3:1",
"model_engine_fuel": "Gasoline",
"model_top_speed_kph": "195",
"model_0_to_100_kph": "10.6",
"model_drive": "Front",
"model_transmission_type": "Manual",
"model_seats": "5",
"model_doors": "3",
"model_weight_kg": "1265",
"model_length_mm": "4230",
"model_width_mm": null,
"model_height_mm": "1450",
"model_wheelbase_mm": "2550",
"model_lkm_hwy": null,
"model_lkm_mixed": "8.2",
"model_lkm_city": null,
"model_fuel_cap_l": "60",
"model_sold_in_us": "0",
"model_co2": null,
"model_make_display": null,
"make_display": "Alfa Romeo",
"make_country": "Italy"
}
]
等等。
我的问题是如何使用PHP将这些数据输入MySQL,请记住,例如model_id
,model_make_id
等是字段名称?