<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1040646" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1040646</link>
    <description></description>
    <language>en</language>
          <item>
    <title>I had just uploaded to</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/sql-query-little-help-please#comment-1228439</link>
    <description> &lt;p&gt;I had just uploaded to Drupal, a module that integrates ajaxim into Drupal. I noticed they lack in good Chat services.&lt;/p&gt;
&lt;p&gt;No, the main reason I am switching, like you said, because they have something Drupal does not.&lt;/p&gt;
&lt;p&gt;No don&#039;t get me wrong, I still think Drupal is the best maintained, and easily the best scripted, but for my particular use, e107 would be better.&lt;/p&gt;
&lt;p&gt;Cheers for the info.&lt;/p&gt;
 </description>
     <pubDate>Fri, 08 Feb 2008 17:51:32 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1228439 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>It has more support, more</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/sql-query-little-help-please#comment-1228432</link>
    <description> &lt;blockquote&gt;&lt;p&gt;It has more support, more modules, and Less bugs.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Not sure about this. Drupal has ~2,000 modules, e107 has 187 (at time of writing). Don&#039;t know about the support and bugs, never really had a problem personally. There are plenty of reasons to not like Drupal, but lack of modules isn&#039;t one of them. Maybe it&#039;s that Drupal lacked a particular module you wanted that e107 has got? That&#039;s fair enough.&lt;/p&gt;
&lt;p&gt;Just use whatever you want to use. None of these projects are really competing with each other, they&#039;re all Free software, run and maintained by their respective communities. Free software developers usually think a little like this: &#039;It&#039;s cool if my software works for other people, but what&#039;s important is that it works for me.&#039;&lt;/p&gt;
&lt;p&gt;What happens then is people find the work and discover it works well for them as well as the person whom originally wrote it. They usually find the software lacks some functionality, or has some bug or other. As it &lt;em&gt;almost&lt;/em&gt; works for them, they submit a patch to add the functionality or fix the bug. This is how a community grows around a project.&lt;/p&gt;
&lt;p&gt;So saying: &#039;I&#039;m moving to project X, Drupal doesn&#039;t do what I need.&#039; Is rather pointless, as it doesn&#039;t help the project, or fix any bugs, no-one is going to be interested. Really, just use whatever the heck you like. e107 probably does some stuff that Drupal doesn&#039;t, or works in a way that better fits you personally. That&#039;s great! Most of all though, I hope you can make a contribution to the e107 community. &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>Fri, 08 Feb 2008 10:07:05 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1228432 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Ahh, OK, cheers.
I have just</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/sql-query-little-help-please#comment-1228431</link>
    <description> &lt;p&gt;Ahh, OK, cheers.&lt;br /&gt;
I have just closed my website because Drupal aint right for me. I am going back to e107. It has more support, more modules, and Less bugs.&lt;/p&gt;
&lt;p&gt;Cheers for the info. I can still use this code on the new platform.&lt;/p&gt;
&lt;p&gt;Thank you to everyone who has helped on this topic.&lt;/p&gt;
 </description>
     <pubDate>Fri, 08 Feb 2008 09:30:46 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1228431 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>How could this be initiated</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/sql-query-little-help-please#comment-1228425</link>
    <description> &lt;blockquote&gt;&lt;p&gt;How could this be initiated on the SQL Server?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It already is. mysql_query() will send the query up to the database server, the database server will process it and return the result to PHP.&lt;/p&gt;
&lt;p&gt;You could optimise that code a bit by using a SQL &lt;code&gt;COUNT()&lt;/code&gt; instead of the &lt;code&gt;mysql_num_rows()&lt;/code&gt; PHP function:&lt;br /&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;$chatrooms &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_result&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: #DD0000&quot;&gt;&#039;SELECT COUNT(*) FROM ajaxim_chats&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;));&lt;br /&gt;print &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;&amp;lt;strong&amp;gt;Public chatrooms:&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;. &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$chatrooms&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;$users_online &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_result&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: #DD0000&quot;&gt;&#039;SELECT COUNT(*) FROM ajaxim_users WHERE is_online=1&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;));&lt;br /&gt;print &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;&amp;lt;strong&amp;gt;Users online:&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;. &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$users_online&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;br /&gt;
&lt;code&gt;mysql_result&lt;/code&gt; is a good function to use here as the SQL is only ever going to return one value, no multiple rows or any of that malarkey.&lt;/p&gt;
 </description>
     <pubDate>Fri, 08 Feb 2008 02:08:38 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1228425 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>OK... But how would I go</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/sql-query-little-help-please#comment-1228420</link>
    <description> &lt;p&gt;OK... But how would I go about this?&lt;/p&gt;
&lt;p&gt;This is my current PHP code:&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;$result &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: #DD0000&quot;&gt;&quot;SELECT * FROM ajaxim_chats&quot;&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;$num_rows &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_num_rows&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;echo &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;strong&amp;gt;Public Chatrooms:&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$num_rows&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\n&quot;&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;
&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;$result &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: #DD0000&quot;&gt;&quot;SELECT * FROM ajaxim_users WHERE is_online = 1&quot;&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;$num_rows &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_num_rows&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;echo &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;strong&amp;gt;Users Online:&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$num_rows&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\n&quot;&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;
&lt;p&gt;How could this be initiated on the SQL Server?&lt;/p&gt;
&lt;p&gt;Thanks in Advance.&lt;/p&gt;
 </description>
     <pubDate>Thu, 07 Feb 2008 18:08:40 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1228420 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I am currently making all</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/sql-query-little-help-please#comment-1228411</link>
    <description> &lt;blockquote&gt;&lt;p&gt;I am currently making all the queries from PHP, what significant difference would there be if I let the database do all the work?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Greg K is saying that the general rule is to make the database do as much of the hard work as possible. Writing the SQL in PHP and running the query using mysql_query() is the right way to do this, that&#039;s not the hard part.&lt;/p&gt;
&lt;p&gt;Where a lot of programmers go wrong is to do a basic SQL query, then loop through the results using an if statement to get the records they want. It&#039;s usually wrong to use an &lt;code&gt;if&lt;/code&gt; statement instead of a &lt;code&gt;WHERE&lt;/code&gt; clause in your SQL. &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>Thu, 07 Feb 2008 02:21:05 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1228411 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Yeah, thats true 
I am</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/sql-query-little-help-please#comment-1228406</link>
    <description> &lt;p&gt;Yeah, thats true &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I am currently making all the queries from PHP, what significant difference would there be if I let the database do all the work?&lt;/p&gt;
 </description>
     <pubDate>Wed, 06 Feb 2008 17:11:43 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1228406 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>All questions are worth</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/sql-query-little-help-please#comment-1228405</link>
    <description> &lt;p&gt;All questions are worth asking. Never delete a question even if you find the answer, instead post a second message saying you solved it, and let people know how you solved it.&lt;/p&gt;
&lt;p&gt;This serves two purposes. 1. Sometimes you may find something that works, but someone else knows a more efficient way of doing it. 2. Someone else may encounter the same issue and do a search and find your post, and then solve their problem too. &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;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Wed, 06 Feb 2008 16:55:54 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1228405 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Concidence. I had just</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/sql-query-little-help-please#comment-1228404</link>
    <description> &lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/grin.png&quot; title=&quot;Laugh&quot; alt=&quot;Laugh&quot; class=&quot;smiley-content&quot; /&gt; Concidence. I had just figured that out right now. I was just returning to TWF to delete this post. Thanks Teammatt3.&lt;/p&gt;
&lt;p&gt;Yeah, our codes are identical. Except I went with &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;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;SELECT * FROM User WHERE is_online = 1\&quot;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt; instead.&lt;/p&gt;
&lt;p&gt;Thanks for your help, and sorry for wastin anyones time (again).&lt;/p&gt;
&lt;p&gt;It seems to me, that I try to do something, then after a few days, I give up, and post on TWF, then guaranteed, I will figure it out when I have already posted the darn question!!!&lt;/p&gt;
&lt;p&gt;Cheers anyways.&lt;/p&gt;
 </description>
     <pubDate>Wed, 06 Feb 2008 16:46:48 +0000</pubDate>
 <dc:creator>Reece S</dc:creator>
 <guid isPermaLink="false">comment 1228404 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>teammatt3 wrote:

I heard</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/sql-query-little-help-please#comment-1228403</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;teammatt3 wrote:&lt;/strong&gt; I heard it&#039;s faster to make MySQL do your counting.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It is a good general rule to have the DB server do as much calculating and figuring as possible and then pass back the final results to the &quot;client&quot; (in this case, PHP) &lt;/p&gt;
&lt;p&gt;This is even more so when you have a separate DB server (physical box) from the web server. There is less recourses to passing back and forth, and if done right, the SQL server should be fine tuned for the DB server, so should calculate faster than on a &quot;general&quot; server set up fro multiple operations.&lt;/p&gt;
&lt;p&gt;But as you are already have a query else where (to possible list the online users), the format you have is correct with the mentioned addition of the WHERE clause.&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Wed, 06 Feb 2008 16:43:35 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1228403 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
