title: PHP and Smarty Execution
body: <p>For example, I have this query in my <strong>news.php</strong> file:</p>
  
  <pre><code>$sql = 'SELECT * FROM `news` ORDER BY `id` DESC LIMIT 0, 5'; 
  $result = mysql_query($sql) or die("Query failed : " . mysql_error());
  while ($line = mysql_fetch_assoc($result)) {
      $value[] = $line;
  }
  // Assign this array to smarty...
  $smarty-&gt;assign('news', $value);
   // Display the news page through the news template
  $smarty-&gt;display('news.tpl');
  </code></pre>
  
  <p>However, in my <strong>news.tpl</strong> file I will not put the <strong>{$news}</strong> variables. Will the query still be executed when I browse <strong>news.php</strong> or it will just be ignored?</p>