title: how to add int number of array to variable
body: <pre><code>$pagename = 'index.html';
  $dbh = connectDb();
  $dbh-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  $stmt = $dbh-&gt;query("select 'tcount' from accessNum where pagename = '$pagename'");
  $record = $stmt-&gt;fetchAll();
  
  if (sizeof($stmt) != 0) {
      $counter = $record['tcount'];
      $counter++;
      $dbh-&gt;exec("update accessNum set tcount = '$counter' where pagename = '$pagename'");
  }
  </code></pre>
  
  
  
  <pre><code>mysql (table name is accessNum) is
  pagename(varchar(255)) = index.html,
  today(date) = 2015-08-31,
  tcount(int(11)) = 1,
  totalcount(int(11)) = 1,
  </code></pre>
  
  <p>the tcount keeps 1 every update.  why it occurs?</p>