<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1030707" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1030707</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/numrows-query#comment-1183240</link>
    <description> &lt;p&gt;Your syntax choosing available interchanging synonymous keywords in the ANSI SQL92 equate to the same ultimate database script. What you have to be carful of is nested selects (mySQL 4.1+ only).&lt;/p&gt;
&lt;p&gt;I hope this helps.&lt;/p&gt;
 </description>
     <pubDate>Sun, 23 Oct 2005 20:00:22 +0000</pubDate>
 <dc:creator>DigitalOmaha</dc:creator>
 <guid isPermaLink="false">comment 1183240 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/numrows-query#comment-1179146</link>
    <description> &lt;p&gt;hiya&lt;/p&gt;
&lt;p&gt;thanlks for your help&lt;/p&gt;
&lt;p&gt;im a bit confused tho&lt;/p&gt;
&lt;p&gt;i could not get it to work with the IS NOT NULL it just displayed all the records&lt;/p&gt;
&lt;p&gt;got it working this way tho&lt;/p&gt;
&lt;p&gt;$query = mysql_query(&quot;SELECT mobile FROM subscriber WHERE mobile != &#039;NULL&#039;&quot;);&lt;br /&gt;
$mobile = mysql_num_rows($query);&lt;/p&gt;
&lt;p&gt;is this not as efficient then?&lt;/p&gt;
&lt;p&gt;thanks!&lt;/p&gt;
&lt;p&gt;JP&lt;/p&gt;
 </description>
     <pubDate>Sat, 10 Sep 2005 11:10:40 +0000</pubDate>
 <dc:creator>JP Stones</dc:creator>
 <guid isPermaLink="false">comment 1179146 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/numrows-query#comment-1179081</link>
    <description> &lt;p&gt;Assuming you have it set up something like:&lt;/p&gt;
&lt;p&gt;  &lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;|&amp;lt;strong&amp;gt;ID&amp;lt;/strong&amp;gt;|&amp;lt;strong&amp;gt;user&amp;lt;/strong&amp;gt;|&amp;lt;strong&amp;gt;email&amp;lt;/strong&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;lt;strong&amp;gt;mobile&amp;lt;/strong&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&amp;nbsp;&amp;nbsp; +--+----+---------------+------------+&lt;br /&gt;&amp;nbsp;&amp;nbsp; | 1|greg|greg@domain.com|&amp;lt;em&amp;gt;NULL&amp;lt;/em&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&amp;nbsp; | 2|john|john@domain.com|555-555-2222|&lt;br /&gt;&amp;nbsp; | 3|mark|&amp;lt;em&amp;gt;NULL&amp;lt;/em&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |555-555-3333|&lt;br /&gt;&amp;nbsp; | 4|rich|rich@domain.com|&amp;lt;em&amp;gt;NULL&amp;lt;/em&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&amp;nbsp; | 5|jill|&amp;lt;em&amp;gt;NULL&amp;lt;/em&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |555-555-5555|&lt;br /&gt;&amp;nbsp; | 6|jane|jane@domain.com|555-555-6666|&lt;br /&gt;&amp;nbsp;&amp;nbsp; +--+----+---------------+------------+&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;   if you are jsut wanting the total number, you can execute:&lt;/p&gt;
&lt;p&gt;   &lt;strong&gt;SELECT count(id) FROM tablename;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;   to get a single row result, with the only value being a count of # of total rows&lt;/p&gt;
&lt;p&gt;   &lt;strong&gt;SELECT COUNT(email) FROM tablename WHERE email IS NOT NULL&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;   to get a single row result, with the only value being a count of # of rows whose email field is NOT NULL (note, this will not work if the field is just set to an empty string). You can do the same with phone.&lt;/p&gt;
&lt;p&gt; Please note, my experience is with mySQL, but something close to these should work in other SQL environments. again these are also if you are just wanting a number, and not needing the data that goes with each one. If you need that, please let me know what language, and if PHP, I could probably write you something.&lt;/p&gt;
&lt;p&gt; FYI: the reason that these are better if you want to get purely a count of records is that when you do this, the SQL server only returns 1 piece of data. Where if you use a function for number of row returned, ALL those rows have to be sent to the language. Not such a big deal when it is just a few records, but as your data increases that is more infor that has to be passed.&lt;/p&gt;
&lt;p&gt;   -Greg&lt;/p&gt;
&lt;p&gt; PS. what the crap is up with the editor for here? When i entered this message, and when i go back to try to edit it, there are NO spaces before the |&#039;s in my example above, they are all lined up! But when the message finally posts, it displayed messed up as above!&lt;/p&gt;
 </description>
     <pubDate>Fri, 09 Sep 2005 19:52:29 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1179081 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
