Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
JSON オブジェクトを SQL データベースに保存したいと考えています。どうすればできますか?
// $app is my objet $js = json_encode($app); mysql_query($con, "INSERT INTO app_event (JSON_app) VALUES ('mysql_real_escape_string($js)');");
これを変える
mysql_query($con,"INSERT INTO app_event (JSON_app) VALUES('mysql_real_escape_string($js)');");
これとともに
mysql_query("INSERT INTO app_event (JSON_app) VALUES('".mysql_real_escape_string($js)."');");
ところで、PHP をさらに学習することを検討する必要があります。