<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1022121" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1022121</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-count-always-returns-1#comment-1136465</link>
    <description> &lt;p&gt;yes zollet that what it should be&lt;/p&gt;
 </description>
     <pubDate>Mon, 18 Aug 2003 21:57:27 +0000</pubDate>
 <dc:creator>druagord</dc:creator>
 <guid isPermaLink="false">comment 1136465 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-count-always-returns-1#comment-1136443</link>
    <description> &lt;p&gt;Shouldn&#039;t it be my &lt;strong&gt;@rows = $sth-&amp;gt;fetchrow_array();&lt;/strong&gt; ? And then the result will be stored in $rows[0]&lt;/p&gt;
 </description>
     <pubDate>Mon, 18 Aug 2003 16:03:20 +0000</pubDate>
 <dc:creator>zollet</dc:creator>
 <guid isPermaLink="false">comment 1136443 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-count-always-returns-1#comment-1136438</link>
    <description> &lt;p&gt;i&#039;m not familliar with how perl interacts with mysql.&lt;br /&gt;
does it pull the entire array?&lt;/p&gt;
&lt;p&gt;if so, count the array.&lt;br /&gt;
if it pulls it one row at a time, is there someplace you can search for a function like php&#039;s mysql_num_rows or myysql_affected_rows?&lt;/p&gt;
 </description>
     <pubDate>Mon, 18 Aug 2003 14:46:44 +0000</pubDate>
 <dc:creator>m3rajk</dc:creator>
 <guid isPermaLink="false">comment 1136438 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-count-always-returns-1#comment-1136395</link>
    <description> &lt;p&gt;I&#039;m not very fluent with perl either.  I don&#039;t know anything about the perl DBI module.&lt;/p&gt;
&lt;p&gt;I believe that whenever you assign an @array to a $scalar, the $scalar then contains the number of elements in the @array.&lt;/p&gt;
 </description>
     <pubDate>Sun, 17 Aug 2003 07:05:13 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1136395 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-count-always-returns-1#comment-1136389</link>
    <description> &lt;p&gt;I don&#039;t know Perl, but what about&lt;/p&gt;
&lt;p&gt;count($sql);&lt;/p&gt;
&lt;p&gt;or $sth&lt;/p&gt;
 </description>
     <pubDate>Sat, 16 Aug 2003 22:34:08 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1136389 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-count-always-returns-1#comment-1136384</link>
    <description> &lt;p&gt;Well, I guess I don&#039;t fully understand how COUNT(*) is supposed to work.&lt;/p&gt;
&lt;p&gt;The following code works:&lt;/p&gt;
&lt;p&gt;my $sql = &quot;SELECT COUNT(*) FROM groups&quot;;&lt;/p&gt;
&lt;p&gt;my $sth = $dbh-&amp;gt;prepare($sql);&lt;/p&gt;
&lt;p&gt;$sth-&amp;gt;execute();&lt;/p&gt;
&lt;p&gt;my $rows = $sth-&amp;gt;fetchrow_array();&lt;/p&gt;
&lt;p&gt;$sth-&amp;gt;finish;&lt;/p&gt;
&lt;p&gt;$rows = the correct number of records matching the SELECT criteria.  Is $rows the scalar &quot;size&quot; of an array?  If so, what are the contents of that array?  Is this the most efficient way to return a count?  I can believe it took me two hours to get to this point.... &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 16 Aug 2003 19:37:04 +0000</pubDate>
 <dc:creator>critical</dc:creator>
 <guid isPermaLink="false">comment 1136384 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
