我有以下的JSON值:如何使用PHP將JSON值插入到MySQL中以創建API?
[newcomposeMail={"msg":"test mail","senderUserId":"1006","subject":"test","to":"10002"}, composeMail]
我的查詢是:
INSERT INTO `push_msg_table`(`pid`, `subject`, `msg`, `sentuserid`, `sent_time`, `upload_path`, `status`) VALUES()
我需要將這些值插入到mysql表。我是JSON的新手。
使用json_decode(newcomposeMail),並嘗試 – Sadikhasan
可能複製http://stackoverflow.com/questions/8990762/how-to-store-json-string-in-mysql的-D b – Jaykishan