<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[PunBB Forums - Error in post.php querry]]></title>
		<link>http://punbb.informer.com/forums/topic/21695/error-in-postphp-querry/</link>
		<description><![CDATA[The most recent posts in Error in post.php querry.]]></description>
		<lastBuildDate>Tue, 02 Jun 2009 09:44:52 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Error in post.php querry]]></title>
			<link>http://punbb.informer.com/forums/post/128133/#p128133</link>
			<description><![CDATA[<p>Thanks for reporting, we will investigate this problem.</p>]]></description>
			<author><![CDATA[dummy@example.com (Slavok)]]></author>
			<pubDate>Tue, 02 Jun 2009 09:44:52 +0000</pubDate>
			<guid>http://punbb.informer.com/forums/post/128133/#p128133</guid>
		</item>
		<item>
			<title><![CDATA[Re: Error in post.php querry]]></title>
			<link>http://punbb.informer.com/forums/post/128126/#p128126</link>
			<description><![CDATA[<p>anyone?</p>]]></description>
			<author><![CDATA[dummy@example.com (Cereal)]]></author>
			<pubDate>Tue, 02 Jun 2009 07:10:34 +0000</pubDate>
			<guid>http://punbb.informer.com/forums/post/128126/#p128126</guid>
		</item>
		<item>
			<title><![CDATA[Error in post.php querry]]></title>
			<link>http://punbb.informer.com/forums/post/128000/#p128000</link>
			<description><![CDATA[<p>when a user group has only access to post on a forum its not possible to really post on this forum ...</p><br /><p>what i did:<br />- created a new forum<br />- allowed the members group to only post on this forum<br />- created a link to the post page of this forum (post.php?fid=&lt;id here&gt;)</p><p>When i load this page i get a &quot;bad request&quot; error so i started looking into this and it seems that the querry below is wrong....</p><div class="codebox"><pre><code>$query = array(
                &#039;SELECT&#039;        =&gt; &#039;f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics&#039;,
                &#039;FROM&#039;          =&gt; &#039;forums AS f&#039;,
                &#039;JOINS&#039;         =&gt; array(
                        array(
                                &#039;LEFT JOIN&#039;             =&gt; &#039;forum_perms AS fp&#039;,
                                &#039;ON&#039;                    =&gt; &#039;(fp.forum_id=f.id AND fp.group_id=&#039;.$forum_user[&#039;g_id&#039;].&#039;)&#039;
                        )
                ),
                &#039;WHERE&#039;         =&gt; &#039;(fp.read_forum IS NULL OR fp.read_forum=1) AND f.id=&#039;.$fid
        );</code></pre></div><p>as you can see that the where is cheking on read_forum and not on post_topics</p><p>i think this querry should be:</p><div class="codebox"><pre><code>$query = array(
                &#039;SELECT&#039;        =&gt; &#039;f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics&#039;,
                &#039;FROM&#039;          =&gt; &#039;forums AS f&#039;,
                &#039;JOINS&#039;         =&gt; array(
                        array(
                                &#039;LEFT JOIN&#039;             =&gt; &#039;forum_perms AS fp&#039;,
                                &#039;ON&#039;                    =&gt; &#039;(fp.forum_id=f.id AND fp.group_id=&#039;.$forum_user[&#039;g_id&#039;].&#039;)&#039;
                        )
                ),
                &#039;WHERE&#039;         =&gt; &#039;(fp.read_forum IS NULL OR fp.post_topics=1) AND f.id=&#039;.$fid
        );</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Cereal)]]></author>
			<pubDate>Thu, 28 May 2009 06:57:55 +0000</pubDate>
			<guid>http://punbb.informer.com/forums/post/128000/#p128000</guid>
		</item>
	</channel>
</rss>
