I look for examples to solve my problem but im confused. If Ii have a json array like this:
$json = '{"a":"test","b":"test2"},{"a":"test3","b":"test4"}';
//decode to get as php variable
$obj = json_decode($json);
My problem is when i try to insert the values in the database
mysql_query("INSERT INTO suspiciousactivity (ID,Notes)
VALUES ('".$obj->{'a'}."','".$obj->{'b'}."')")or die(mysql_error());
I get this error: duplicate entry for key PRIMARY
How can I insert a multiple values from my JsonArray to my database?
suspiciousactivityentry with ID = test