How to insert JSON values into MySQL using PHP for an API creation? -


i have following json values:

[newcomposemail={"msg":"test mail","senderuserid":"1006","subject":"test","to":"10002"}, composemail] 

my query is:

 insert `push_msg_table`(`pid`, `subject`, `msg`, `sentuserid`, `sent_time`, `upload_path`, `status`) values() 

i need insert these values mysql table. new json.

try use in php

json_decode(newcomposeemail,true); 

adding true proper array else return object in php

if there multiple entries in json , have loop through json array, in order insert multiple entries in db


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -