错误:数组值必须以“{”或维度信息LINE 1

时间:2016-06-07 07:50:07

标签: sql arrays postgresql sql-insert

当我运行代码时,它会向我显示此错误。

A Database Error Occurred

Error Number:

ERROR: array value must start with "{" or dimension information LINE 1: ...0232882', 'Kathmandu', 'Baneshwor', '2016-06-08', '13:00', '... ^

INSERT INTO "report" ("ukey", "district", "police_station", "event_date", "event_time", "accident_severity", "hit_and_run", "report_recorded_timestamp", "no_vechiles_involved", "no_of_driver_casualty", "no_of_passenger_casualty", "no_of_pedestrian_casualty") VALUES ('57567b4729356260232882', 'Kathmandu', 'Baneshwor', '2016-06-08', '13:00', '3', 'false', '2016-06-07 09:44:26', '1', '1', '0', '0')

Filename: C:\wamp\www\nrcds\system\database\DB_driver.php

Line Number: 330

我不知道什么是错的。请指导我。提前致谢

1 个答案:

答案 0 :(得分:1)

您的一个列是一个数组。在列周围添加{}

INSERT INTO "report" (yourarraycolumn) VALUES ('{value}')