title: Read one column from one row from a MySQL database
body: <p>Is there a quick and dirty way to get the value of one column from one row? Right now I use something like this:</p>
  
  <pre><code>$result = mysql_query("SELECT value FROM table WHERE row_id='1'");
  $row = mysql_fetch_array($result);
  return $row['value'];
  </code></pre>
  
  <p>It seems there must be able to consolidate the second and third lines.</p>
  
  <p>These three lines seem like a lot just to get the value from one column from one row. I tried this:</p>
  
  <p>$result = mysql_query("SELECT value FROM table WHERE row_id='1'");
    return mysql_fetch_array($result)['value'];</p>
  
  <p>But that doesn't work. I am just trying to find out if there is a simpler,  more to the point, way of getting one value like this.</p>