<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://www.maianscriptworld.co.uk/forums/extern.php?action=feed&amp;tid=2753&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Maian Script World Support Forums / Receipe of the day]]></title>
		<link>http://www.maianscriptworld.co.uk/forums/viewtopic.php?id=2753</link>
		<description><![CDATA[The most recent posts in Receipe of the day.]]></description>
		<lastBuildDate>Thu, 22 Mar 2012 15:45:22 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Receipe of the day]]></title>
			<link>http://www.maianscriptworld.co.uk/forums/viewtopic.php?pid=14056#p14056</link>
			<description><![CDATA[<p>Its always random above. To have the same don`t use random.</p>]]></description>
			<author><![CDATA[dummy@example.com (msworld)]]></author>
			<pubDate>Thu, 22 Mar 2012 15:45:22 +0000</pubDate>
			<guid>http://www.maianscriptworld.co.uk/forums/viewtopic.php?pid=14056#p14056</guid>
		</item>
		<item>
			<title><![CDATA[Re: Receipe of the day]]></title>
			<link>http://www.maianscriptworld.co.uk/forums/viewtopic.php?pid=14055#p14055</link>
			<description><![CDATA[<p>This gives me an idea. </p><p>What if we want the same image to stay for one day, when we refresh the page, will the image/recipe change as well?</p>]]></description>
			<author><![CDATA[dummy@example.com (duceduc)]]></author>
			<pubDate>Thu, 22 Mar 2012 10:57:43 +0000</pubDate>
			<guid>http://www.maianscriptworld.co.uk/forums/viewtopic.php?pid=14055#p14055</guid>
		</item>
		<item>
			<title><![CDATA[Re: Receipe of the day]]></title>
			<link>http://www.maianscriptworld.co.uk/forums/viewtopic.php?pid=14054#p14054</link>
			<description><![CDATA[<p>Hi Lecra,</p><p>This isn`t so difficult, so here goes:</p><p>1. First you need to get a random recipe:</p><div class="quotebox"><blockquote><div><p>$q = mysql_query(&quot;SELECT * FROM mr_recipes WHERE enRecipe = &#039;yes&#039; ORDER BY rand() LIMIT 1&quot;);<br />$RECIPE = mysql_fetch_object($q);</p></div></blockquote></div><p>So, the $RECIPE object now holds the info you need. Title would be:</p><div class="quotebox"><blockquote><div><p>&lt;?php<br />echo $RECIPE-&gt;name;<br />?&gt;</p></div></blockquote></div><p>2. Next grab an image. You can do random for that too if there are more than 1:</p><div class="quotebox"><blockquote><div><p>$q2 = mysql_query(&quot;SELECT * FROM mr_pictures WHERE recipe = &#039;{$RECIPE-&gt;id}&#039; ORDER BY rand() LIMIT 1&quot;);<br />$IMG = mysql_fetch_object($q2);</p></div></blockquote></div><p>3. Display image:</p><div class="quotebox"><blockquote><div><p>&lt;img src=&quot;templates/images/recipes/&lt;?php echo $IMG-&gt;picPath; ?&gt;&quot; alt=&quot;&quot; title=&quot;&quot; /&gt;</p></div></blockquote></div><p>Try that. I`ll leave you to the design part of things.</p>]]></description>
			<author><![CDATA[dummy@example.com (msworld)]]></author>
			<pubDate>Thu, 22 Mar 2012 07:31:45 +0000</pubDate>
			<guid>http://www.maianscriptworld.co.uk/forums/viewtopic.php?pid=14054#p14054</guid>
		</item>
		<item>
			<title><![CDATA[Receipe of the day]]></title>
			<link>http://www.maianscriptworld.co.uk/forums/viewtopic.php?pid=14038#p14038</link>
			<description><![CDATA[<p>Hi all,</p><p>Anybody that has already implemented, or is willing to help me in implementing a &#039;recipe of the day&#039; on the front side?</p><p>The idea is to pick up a randomly recipe from the database and put the title, and a possible image on the front side. Clicking on it (image or title) would forward the user to the recipe.</p><p>I have no clue how to implement it as I&#039;m completely a PHP noob!</p><p>Any volunteers?</p><p>KR; Lecra</p>]]></description>
			<author><![CDATA[dummy@example.com (lecra)]]></author>
			<pubDate>Wed, 21 Mar 2012 10:17:24 +0000</pubDate>
			<guid>http://www.maianscriptworld.co.uk/forums/viewtopic.php?pid=14038#p14038</guid>
		</item>
	</channel>
</rss>
