<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>current year in where clause</title>
        <link>https://interactivetools.com/forum/forum-posts.php?current-year-in-where-clause-72241</link>
        <description></description>
        <pubDate>Wed, 18 Nov 2026 19:22:04 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;current-year-in-where-clause-72241" rel="self" type="application/rss+xml" />

                <item>
          <title>Re: [kovali] current year in where clause</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2209528#post2209528</link>
          <description><![CDATA[I found the solution: <br /><br /><font size="2">'where' =&gt; 'year=$var',  should be <span style="color: #000000">'where' =&gt; &quot;year=$var&quot;,           [/#000000]</font><span style="color: #000000"><font size="2">(double quotes instead of single quotes...)</font>[/#000000] <br /><br /><span style="color: #000000"><font size="2">Koen</font>[/#000000] <br /><br /><span style="color: #000000"><font size="2"></font>[/#000000]<br />]]></description>
          <pubDate>Tue, 08 Feb 2011 14:04:51 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2209528#post2209528</guid>
        </item>
                <item>
          <title>current year in where clause</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2209510#post2209510</link>
          <description><![CDATA[Hi, <br /><br />I would like to show only the results of the current year in the list page, my code: <br /><br />&lt;?php header('Content-type: text/html; charset=utf-8'); ?&gt;<br />&lt;?php<br />  // load viewer library<br />  $libraryPath = 'beheer/lib/viewer_functions.php';<br />  $dirsToCheck = array('/home/yannicke/public_html/','','../','../../','../../../');<br />  foreach ($dirsToCheck as $dir) { if (@include_once(&quot;$dir$libraryPath&quot;)) { break; }}<br />  if (!function_exists('getRecords')) { die(&quot;Couldn't load viewer library, check filepath in sourcecode.&quot;); } <br /><br />   $var = date(&quot;Y&quot;, time());<br />      <br />  // load records<br />    list($resultatenRecords, $resultatenMetaData) = getRecords(array(<br />    'tableName'   =&gt; 'resultaten',<br /> 'where' =&gt; 'year=$var',<br />    'perPage'     =&gt; '10',<br /> 'orderBy'     =&gt; 'datum DESC, title',<br />    'loadUploads' =&gt; '0',<br />    'allowSearch' =&gt; '0',<br />  )); <br /><br />?&gt; <br /><br />I am new to php so forgive me my asking, but: <br /><br />'where' =&gt; 'year=$var',<br />doesn't work...  <br /><br />When I change $var with a fixed value like 2011, I get all the records for this year though... how can this be done please ? <br /><br />Thx,<br />Koen<br />]]></description>
          <pubDate>Tue, 08 Feb 2011 04:38:01 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2209510#post2209510</guid>
        </item>
              </channel>
    </rss>
  