<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How To Use Php Code Stored In Mysql Database?</title>
	<atom:link href="http://www.spiderphp.com/uncategorized/how-to-use-php-code-stored-in-mysql-database.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.spiderphp.com/uncategorized/how-to-use-php-code-stored-in-mysql-database.html</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 28 Feb 2010 19:00:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: lordgun2</title>
		<link>http://www.spiderphp.com/uncategorized/how-to-use-php-code-stored-in-mysql-database.html/comment-page-1#comment-496</link>
		<dc:creator>lordgun2</dc:creator>
		<pubDate>Mon, 06 Jul 2009 02:40:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.spiderphp.com/faq/how-to-use-php-code-stored-in-mysql-database.html#comment-496</guid>
		<description>You can use json : it handles encoding/decoding variables.
If you have a big object like $object, insert into mysql json_encode($object) and later you&#039;ll be able to retrieve it by using $object=json_decode($data) 
where $data is the correct mysql field</description>
		<content:encoded><![CDATA[<p>You can use json : it handles encoding/decoding variables.<br />
If you have a big object like $object, insert into mysql json_encode($object) and later you&#8217;ll be able to retrieve it by using $object=json_decode($data)<br />
where $data is the correct mysql field</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug V</title>
		<link>http://www.spiderphp.com/uncategorized/how-to-use-php-code-stored-in-mysql-database.html/comment-page-1#comment-495</link>
		<dc:creator>Doug V</dc:creator>
		<pubDate>Sun, 05 Jul 2009 22:53:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.spiderphp.com/faq/how-to-use-php-code-stored-in-mysql-database.html#comment-495</guid>
		<description>If you mean you have stored some page code in a MySQL field; in that data, there is PHP code; and you want that data to be evaluated as PHP code, you just call eval().
&lt;?php
//your DB connection data goes here
$rs = mysql_query(&quot;SELECT column FROM table&quot;) or die(&quot;cannot execute query&quot;);
if(mysql_num_rows($rs) &gt; 0) {
$row = mysql_fetch_array($rs);
eval($row[&#039;column&#039;]);
}
?&gt;</description>
		<content:encoded><![CDATA[<p>If you mean you have stored some page code in a MySQL field; in that data, there is PHP code; and you want that data to be evaluated as PHP code, you just call eval().<br />
< ?php<br />
//your DB connection data goes here<br />
$rs = mysql_query("SELECT column FROM table") or die("cannot execute query");<br />
if(mysql_num_rows($rs) > 0) {<br />
$row = mysql_fetch_array($rs);<br />
eval($row['column']);<br />
}<br />
?></p>
]]></content:encoded>
	</item>
</channel>
</rss>
