<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1019644" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1019644</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/weird-rand-thing#comment-1118186</link>
    <description> &lt;p&gt;Here is the query, nothing different.&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;$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 guestbook_message, guestbook_name from guestbook order &lt;br /&gt;by RAND() limit 1\&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_fetch_array(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 11 Nov 2002 21:46:07 +0000</pubDate>
 <dc:creator>mairving</dc:creator>
 <guid isPermaLink="false">comment 1118186 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/weird-rand-thing#comment-1118182</link>
    <description> &lt;p&gt;Like Mark Irving, I&#039;m thinking that because the RAND() is in the SQL statement, PHP shouldn&#039;t touch it.&lt;/p&gt;
&lt;p&gt;What kind of quotes is your SQL statement in?&lt;/p&gt;
 </description>
     <pubDate>Mon, 11 Nov 2002 18:30:07 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1118182 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/weird-rand-thing#comment-1118180</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: &lt;em&gt;Originally posted by zollet &lt;/em&gt;&lt;br /&gt;
&lt;strong&gt;PHP&#039;s rand() changed since PHP 4.2.0, now you don&#039;t need to seed it anymore and the syntax is [b]rand( [min value, max value )&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So to get a random number between 1 and 10 you would do &lt;strong&gt;rand(1, 10);&lt;/strong&gt; [/B]&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Yes, I have seen that the rand function doesn&#039;t have to be seeded any more. The thing is that this really shouldn&#039;t have anything to do with PHP. It should have to do with MySQL since I am pulling the random field out with a Select statement.&lt;/p&gt;
 </description>
     <pubDate>Mon, 11 Nov 2002 18:26:09 +0000</pubDate>
 <dc:creator>mairving</dc:creator>
 <guid isPermaLink="false">comment 1118180 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/weird-rand-thing#comment-1118163</link>
    <description> &lt;p&gt;PHP&#039;s rand() changed since PHP 4.2.0, now you don&#039;t need to seed it anymore and the syntax is &lt;strong&gt;rand( [min value, max value )&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So to get a random number between 1 and 10 you would do &lt;strong&gt;rand(1, 10);&lt;/strong&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 11 Nov 2002 16:12:12 +0000</pubDate>
 <dc:creator>zollet</dc:creator>
 <guid isPermaLink="false">comment 1118163 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/weird-rand-thing#comment-1118151</link>
    <description> &lt;p&gt;MySQL is 3.23.39. It can&#039;t be MySQL because when I log in via SSH and run the query in MySQL, it works fine.&lt;/p&gt;
 </description>
     <pubDate>Mon, 11 Nov 2002 11:36:38 +0000</pubDate>
 <dc:creator>mairving</dc:creator>
 <guid isPermaLink="false">comment 1118151 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/weird-rand-thing#comment-1118128</link>
    <description> &lt;p&gt;just checked, you need mySQL version 3.23 to do &quot;ORDER BY RAND()&quot;&lt;/p&gt;
&lt;p&gt;I can&#039;t find anywhere that mentions problems with later versions.&lt;/p&gt;
 </description>
     <pubDate>Mon, 11 Nov 2002 07:08:48 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1118128 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/weird-rand-thing#comment-1118126</link>
    <description> &lt;p&gt;Very odd.  What version of mySQL do the two machines have?&lt;br /&gt;
(I&#039;m doubting PHP has anything to do with it)&lt;/p&gt;
 </description>
     <pubDate>Mon, 11 Nov 2002 06:57:53 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1118126 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
