<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PunBB Forums - Error in post.php querry]]></title>
	<link rel="self" href="http://punbb.informer.com/forums/feed/atom/topic/21695/"/>
	<updated>2009-06-02T09:44:52Z</updated>
	<generator>PunBB</generator>
	<id>http://punbb.informer.com/forums/topic/21695/error-in-postphp-querry/</id>
		<entry>
			<title type="html"><![CDATA[Re: Error in post.php querry]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128133/#p128133"/>
			<content type="html"><![CDATA[<p>Thanks for reporting, we will investigate this problem.</p>]]></content>
			<author>
				<name><![CDATA[Slavok]]></name>
				<uri>http://punbb.informer.com/forums/user/13265/</uri>
			</author>
			<updated>2009-06-02T09:44:52Z</updated>
			<id>http://punbb.informer.com/forums/post/128133/#p128133</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Error in post.php querry]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128126/#p128126"/>
			<content type="html"><![CDATA[<p>anyone?</p>]]></content>
			<author>
				<name><![CDATA[Cereal]]></name>
				<uri>http://punbb.informer.com/forums/user/7510/</uri>
			</author>
			<updated>2009-06-02T07:10:34Z</updated>
			<id>http://punbb.informer.com/forums/post/128126/#p128126</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Error in post.php querry]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128000/#p128000"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Cereal]]></name>
				<uri>http://punbb.informer.com/forums/user/7510/</uri>
			</author>
			<updated>2009-05-28T06:57:55Z</updated>
			<id>http://punbb.informer.com/forums/post/128000/#p128000</id>
		</entry>
</feed>
