<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Problem with Double WHERE statement</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Problem-with-Double-WHERE-statement-71708</link>
        <description></description>
        <pubDate>Mon, 15 Jun 2026 20:10:40 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Problem-with-Double-WHERE-statement-71708" rel="self" type="application/rss+xml" />

                <item>
          <title>Re: [zip222] Problem with Double WHERE statement</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2206644#post2206644</link>
          <description><![CDATA[Hi,<br /><br />The where statement has to be a string.  Try this:<br /><br /><code>&lt;?php <br />	<span style="color:red">$where=&quot;1&quot;</span>;  <br />	  <br />	if(!$CURRENT_USER['staff']){  <br />		$where = &quot;conflicts_of_interest NOT LIKE '%\t&quot;.intval($CURRENT_USER['num']).&quot;\t%'&quot;;  <br />		} <br /> <br />	list($applicationsRecords, $applicationsMetaData) = getRecords(array( <br />		'tableName'		=&gt; 'applications2010', <br />		'where'			=&gt; <span style="color:red">&quot;$where AND full=1&quot;</span>, <br />		)); <br /> <br />?&gt;</code><br /><br />You'll want to use $where=&quot;1&quot; because if the current user is not staff, you'll have an &quot;AND&quot; in your where clause with no initial where statement.  This would result in an error.<br /><br />Hope this helps<br />]]></description>
          <pubDate>Wed, 08 Sep 2010 17:14:21 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2206644#post2206644</guid>
        </item>
                <item>
          <title>Problem with Double WHERE statement</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2206636#post2206636</link>
          <description><![CDATA[Not sure why, but the double where statement below is not working. Any ideas why?<br /><br /><code>&lt;?php<br />	$where=&quot;&quot;; <br />	 <br />	if(!$CURRENT_USER['staff']){ <br />		$where = &quot;conflicts_of_interest NOT LIKE '%\t&quot;.intval($CURRENT_USER['num']).&quot;\t%'&quot;; <br />		}<br /><br />	list($applicationsRecords, $applicationsMetaData) = getRecords(array(<br />		'tableName'		=&gt; 'applications2010',<br />		<b>'where'			=&gt; $where AND 'full=1',</b><br />		));<br /><br />?&gt;</code><br />]]></description>
          <pubDate>Wed, 08 Sep 2010 16:20:50 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2206636#post2206636</guid>
        </item>
              </channel>
    </rss>
  