JSON文字列を持っています
{"name":"jack","school":"colorado state","city":"NJ","id":null}
データベースに保存する必要があります。どうすればこれを行うことができますか?
私のPHPコード(MySQLへの接続を確立しただけですが、レコードを保存できません)
<?php
// the MySQL Connection
mysql_connect("localhost", "username", "pwd") or die(mysql_error());
mysql_select_db("studentdatabase") or die(mysql_error());
// Insert statement
mysql_query("INSERT INTO student
(name, school,city) VALUES(------------------------- ) ") // (How to write this)
or die(mysql_error());
echo "Data Inserted or failed";
?>