从mysql返回数据到html

I'm have database which i'm I'm retrieving only one cell from it, below is an example:

+------+
|Failed|
+------+
|325   |
+------+

i'm trying to add this value to multiple areas in my html file, however i'm unable to do that, below is the html file:

JSON:

$(document).ready(function() {

$.getJSON('PHP/Faild.php', function(GetFailedRenew) {
        // set the html content of the id myThing to the value contained in data
        $("#myThing").html(data.value);
     });   
});

html Body sample:

<div class="inner">
<h3>150</h3>
<p id="myThing"></p>
</div>

Failed.php

<?php

$DB_NAME = 'test';
$DB_HOST = 'localhost';
$db_port = '3306';
$DB_USER = 'root';
$DB_PASS = 'mysql';

$mysqli = new mysqli($DB_HOST, $DB_USER, $DB_PASS, $DB_NAME);

  if (mysqli_connect_errno()) {
    printf("Connect failed: %s
", mysqli_connect_error());
    exit();
  }



  $result = $mysqli->query('SELECT RenewFailed FROM Statistics where id=(select max(id) from Statistics);');
  $rows = array();
  $table = array();
  $table['cols'] = array(
  array('label' => 'RenewFailed', 'type' => 'number')

);
    foreach($result as $r) {

      $temp = array();

      $temp[] = array('v' => (string) $r['RenewFailed']); 
      $rows[] = array('c' => $temp);
    }

$table['rows'] = $rows;

// convert data into JSON format
$SubsStats = json_encode($table);
echo $SubsStats;

?>

and this is the outpout of failed.php:

{"cols":[{"label":"RenewFailed","type":"number"}],"rows":[{"c":[{"v":"325"}]}]}

i'm a newbie in PHP and JSON so please let me know if there is any other/better way to achieve the above..

thanks Ali

http://api.jquery.com/jquery.getjson/ Change data.value to this GetFailedRenew look here for example