title: json value returning null from mysql varchar
body: <p>I'm trying to get the data from mysql using json. the field type is Varchar(56).
  this is my php codes :</p>
  
  <pre><code>&lt;?php
      $link = mysql_connect('localhost', 'root', '') or die('Cannot connect to the DB');
      mysql_select_db('tugas_akhir', $link) or die('Cannot select the DB');
  
      /* grab the posts from the db */
  
      $query = "SELECT ekuivalen
          FROM temp_hasil where username='Dia'";
      $result = mysql_query($query, $link) or die('Errorquery:  '.$query);
  
      $rows = array();
      while ($r = mysql_fetch_assoc($result)) {
          $rows[] = $r;
      }
  
      $data = "{aturan:".json_encode($rows)."}";
      echo $data;
  
      ?&gt;
  </code></pre>
  
  <p>when I run it on firefox it shows</p>
  
  <pre><code>{aturan:[{"ekuivalen":null}]}
  </code></pre>
  
  <p>thanks for your help </p>