<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Can I add a "LIMIT" statement?</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Can I add a "LIMIT" statement?</description>
<language>en</language>
<pubDate>Sun, 03 May 2026 23:07:10 +0000</pubDate>

<item>
<title>redityo on "Can I add a "LIMIT" statement?"</title>
<link>https://www.machform.com/forums/topic/can-i-add-a-limit-statement#post-4118</link>
<pubDate>Thu, 01 Jan 2009 09:34:43 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">4118@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi Ron,&#60;/p&#62;
&#60;p&#62;I think you wrong put the limit statement, it should be like this &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;select
A.*,
B.option as month,
C.option as year
from
(ap_form_4 as A
left join ap_element_options as B
on A.element_1=B.option_id and B.element_id=1 and B.form_id=4)
left join ap_element_options as C
on A.element_2=C.option_id and C.element_id=2 and C.form_id=4
LIMIT 1,10&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>rscott7706 on "Can I add a "LIMIT" statement?"</title>
<link>https://www.machform.com/forums/topic/can-i-add-a-limit-statement#post-4114</link>
<pubDate>Wed, 31 Dec 2008 22:56:22 +0000</pubDate>
<dc:creator>rscott7706</dc:creator>
<guid isPermaLink="false">4114@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Yes, it crashed it.  I may be trying to put it in the wrong place.&#60;/p&#62;
&#60;p&#62;Here is the error code:&#60;br /&#62;
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' B.option as month, C.option as year from (ap_form_4 as ' at line 2&#60;/p&#62;
&#60;p&#62;I put the limit statement here:&#60;/p&#62;
&#60;p&#62;$query = &#34;select&#60;br /&#62;
      A.* LIMIT 1, 10,&#60;br /&#62;
      B.option as month,&#60;br /&#62;
      C.option as year&#60;br /&#62;
  from&#60;/p&#62;
&#60;p&#62;Thanks!!&#60;br /&#62;
Ron
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Can I add a "LIMIT" statement?"</title>
<link>https://www.machform.com/forums/topic/can-i-add-a-limit-statement#post-4111</link>
<pubDate>Wed, 31 Dec 2008 17:56:47 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">4111@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I suppose so. Did you get any error message when you add the LIMIT?
&#60;/p&#62;</description>
</item>
<item>
<title>rscott7706 on "Can I add a "LIMIT" statement?"</title>
<link>https://www.machform.com/forums/topic/can-i-add-a-limit-statement#post-4109</link>
<pubDate>Wed, 31 Dec 2008 11:57:45 +0000</pubDate>
<dc:creator>rscott7706</dc:creator>
<guid isPermaLink="false">4109@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Following is code that works great for some online newsletters.  But, I get one continuous column (year 2006 through 2008) - not useful as is.  I would like to break in to year columns.&#60;/p&#62;
&#60;p&#62;Can I add a LIMIT statement to the following code (i.e LIMIT 1, 12):&#60;/p&#62;
&#60;p&#62;$query = &#34;select&#60;br /&#62;
      A.*,&#60;br /&#62;
      B.option as month,&#60;br /&#62;
      C.option as year&#60;br /&#62;
  from&#60;br /&#62;
      (ap_form_4 as A&#60;br /&#62;
       left join ap_element_options as B&#60;br /&#62;
              on A.element_1=B.option_id and B.element_id=1 and B.form_id=4)&#60;br /&#62;
       left join ap_element_options as C&#60;br /&#62;
              on A.element_2=C.option_id and C.element_id=2 and C.form_id=4&#34;;&#60;/p&#62;
&#60;p&#62;$result = mysql_query($query) or die(mysql_error());&#60;/p&#62;
&#60;p&#62;echo &#34;&#38;lt;font face=\&#34;arial\&#34;&#38;gt;&#34;;&#60;br /&#62;
while($row = mysql_fetch_array($result)){&#60;br /&#62;
    echo &#34;&#38;lt;font color= #800000&#38;gt;&#38;lt;font size=2&#38;gt;&#38;lt;b&#38;gt;&#34;;&#60;br /&#62;
    echo &#34;&#38;lt;p&#38;gt;&#34;;&#60;br /&#62;
    echo $row['month'];&#60;br /&#62;
    echo &#34;&#38;nbsp;&#34;;&#60;br /&#62;
    echo $row['year'];&#60;br /&#62;
    echo &#34;&#38;nbsp;&#34;;&#60;br /&#62;
    echo &#34;&#60;a href='$row[element_4]'&#62;&#38;nbsp; - &#38;nbsp;View&#60;/a&#62;&#34;;&#60;br /&#62;
	echo &#34;&#38;lt;/b&#38;gt;&#38;lt;/font&#38;gt;&#34;;&#60;br /&#62;
    echo &#34;&#38;lt;font color= #E4DCAB&#38;gt;&#38;lt;font size=2&#38;gt;&#34;;&#60;br /&#62;
    echo &#34;&#38;lt;br&#38;gt;&#34;;&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;
&#60;/p&#62;</description>
</item>

</channel>
</rss>
