Json to Mysql Databse <p>I'm trying to parse a json file and push fields to database jSON Source : <code>http://graph.facebook.com/10153575791993298/</code></p> <p>Parsing and Echo</p> <pre><code>&lt;?php $json_file = file_get_contents('http://graph.facebook.com/10153575791993298/'); $info = json_decode($json_file); if ($info) { foreach ($info-&gt;likes-&gt;data as $obj){ echo $obj-&gt;id, "&lt;br/&gt;"; echo $obj-&gt;name, "&lt;br/&gt;"; } } ?&gt; </code></pre> <p>Database part :</p> <pre><code>&lt;?php // Create connection $mysqli = new mysqli('localhost', 'root', 'root', 'facebook'); $query = &lt;&lt;&lt;SQL INSERT INTO Likes ('ID', 'Name') VALUES (?, ?) SQL; $stmt = $mysqli-&gt;prepare($query); foreach ($info['data'] as $key =&gt; $value) { $stmt-&gt;bind_param( // the types of the data we are about to insert: s = string, i = int 'ss', $value['id'], $value['name'], ); $stmt-&gt;execute(); } $stmt-&gt;close(); $mysqli-&gt;close(); ?&gt; </code></pre> <p>I setup my tables correctly and I don't know why I can't push data to my database. Json part that I would like to retrieve data and push to my db <code>http://graph.facebook.com/10153575791993298/likes</code></p>