<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1041824" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1041824</link>
    <description></description>
    <language>en</language>
          <item>
    <title>DOH!
mysql_fetch_array($data</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-query-only-returning-first-result-twice#comment-1232936</link>
    <description> &lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/doh.png&quot; title=&quot;Doh!&quot; alt=&quot;Doh!&quot; class=&quot;smiley-content&quot; /&gt; DOH!&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mysql_fetch_array($data)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;only returns one row from the db at a time...&lt;/p&gt;
&lt;p&gt;so you need a &quot;while&quot; loop to loop through all the rows in the db..&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$con &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_connect&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;localhost&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;communit_508dev&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;commUNIT&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;if (!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$con&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; die(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;Could not connect: &#039; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;. &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_error&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;());&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_select_db&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;communit_508prov&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$con&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;SELECT ptext FROM&amp;nbsp; provisions&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$data &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_query&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;( &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$con &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;while(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_fetch_array&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$data&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$arr &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;ptext&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] . &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;br /&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;print_r&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$arr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_close&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$con&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 01 Sep 2008 15:45:09 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1232936 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
