<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Free Online Computer Lessons</title>
	<atom:link href="http://www.onlinecomputerlessons.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.onlinecomputerlessons.com</link>
	<description>Learn from the Pros!</description>
	<lastBuildDate>Fri, 29 Oct 2010 05:22:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Lazy: Change the way you code and speed up php.</title>
		<link>http://www.onlinecomputerlessons.com/lazy-change-the-way-you-code-and-speed-up-php/</link>
		<comments>http://www.onlinecomputerlessons.com/lazy-change-the-way-you-code-and-speed-up-php/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 05:19:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Coding]]></category>

		<guid isPermaLink="false">http://www.onlinecomputerlessons.com/?p=54</guid>
		<description><![CDATA[Echo vs Print – With current versions of PHP Echo is the way to go. When you have to print multiple strings, Echo allows you to skip the overhead of concatenation when you use “,” instead of “.” between strings. Single vs Double quote – when possible use single quote, as double quote strings are [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Echo vs Print</strong> – With current versions of PHP Echo is the way to go.  When you have to print multiple strings, Echo allows you to skip the overhead of concatenation when you use “,” instead of “.” between strings.</p>
<p><strong>Single vs Double quote</strong> – when possible use single quote, as double quote strings are processed by PHP.</p>
<p><strong>Accessing data in Arrays</strong> – When working with an associative array, PHP operates quickest when the variable array is enclosed in single quotes such as $row[‘thomas’].</p>
<p><strong>Function vs no functions </strong>– Everything is passed by reference after PHP 5, which significantly speeds things up, however they are still less efficient than code without functions.  If you reuse the code multiple times within the document, functions are a must. If you are only using it once, it is just extra overhead.  (This statement is against everything taught in school.)</p>
<p><strong>Extra variables</strong> – Try to use as few variables as possible.  For example:<br />
$a=time();<br />
$tomorrow=$a + (24*60*60);<br />
is less efficient than<br />
$tomorrow=$time+(24*60*60);</p>
<p><strong>Count () in for loop</strong> – There are exceptions to the ‘use as few variables as possible’ rule.  The most common is when you have the count function in a conditional loop. </p>
<p><strong>Unset</strong> – when you are done using a variable, you can regain the memory by using unset.</p>
<p><strong>Close connections /file handers</strong> – Give PHP back the resources when they are not needed.</p>
<p><strong>Cache page if possible</strong>.</p>
<p><strong>Lazy way to test</strong><br />
<code><br />
$time = microtime(true);<br />
#<br />
# code to be benchmarked here<br />
#<br />
echo '
<p>Time elapsed: ',microtime(true) - $time, ' seconds';<br />
</code></p>
<p><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Flazy-change-the-way-you-code-and-speed-up-php%2F&amp;counturl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Flazy-change-the-way-you-code-and-speed-up-php%2F&amp;count=horizontal&amp;text=Lazy%3A%20Change%20the%20way%20you%20code%20and%20speed%20up%20php.: " frameborder="0" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Flazy-change-the-way-you-code-and-speed-up-php%2F&amp;linkname=Lazy%3A%20Change%20the%20way%20you%20code%20and%20speed%20up%20php." title="Facebook" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Flazy-change-the-way-you-code-and-speed-up-php%2F&amp;linkname=Lazy%3A%20Change%20the%20way%20you%20code%20and%20speed%20up%20php." title="Reddit" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Flazy-change-the-way-you-code-and-speed-up-php%2F&amp;linkname=Lazy%3A%20Change%20the%20way%20you%20code%20and%20speed%20up%20php." title="Digg" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Flazy-change-the-way-you-code-and-speed-up-php%2F&amp;linkname=Lazy%3A%20Change%20the%20way%20you%20code%20and%20speed%20up%20php." title="Delicious" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.onlinecomputerlessons.com/lazy-change-the-way-you-code-and-speed-up-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEO Pro Tip: Check your domain redirects</title>
		<link>http://www.onlinecomputerlessons.com/seo-301-redirect-checker/</link>
		<comments>http://www.onlinecomputerlessons.com/seo-301-redirect-checker/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 02:46:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.onlinecomputerlessons.com/?p=32</guid>
		<description><![CDATA[Want your links juice to flow from your old domain to your new one? Make sure you redirect it properly with a 301 redirect. Use the form below to test if your URL redirect is SEO friendly. URL to Check:]]></description>
			<content:encoded><![CDATA[<p>Want your links juice to flow from your old domain to your new one?  Make sure you redirect it properly with a 301 redirect.  Use the form below to test if your URL redirect is SEO friendly.</p>
<div style="margin-left:auto;margin-right:auto;border:1px solid #333; padding:40px;width:320px;background-color:#E2E2E2">
<form action="" method="post"><big>URL to Check: </big><br />
<input name="url" id="url" style="width:210px" value="http://" />
<input type="submit" value="Submit URL" /></form>
</div>
<p><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fseo-301-redirect-checker%2F&amp;counturl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fseo-301-redirect-checker%2F&amp;count=horizontal&amp;text=SEO%20Pro%20Tip%3A%20Check%20your%20domain%20redirects: " frameborder="0" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fseo-301-redirect-checker%2F&amp;linkname=SEO%20Pro%20Tip%3A%20Check%20your%20domain%20redirects" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fseo-301-redirect-checker%2F&amp;linkname=SEO%20Pro%20Tip%3A%20Check%20your%20domain%20redirects" title="Reddit" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fseo-301-redirect-checker%2F&amp;linkname=SEO%20Pro%20Tip%3A%20Check%20your%20domain%20redirects" title="Digg" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fseo-301-redirect-checker%2F&amp;linkname=SEO%20Pro%20Tip%3A%20Check%20your%20domain%20redirects" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.onlinecomputerlessons.com/seo-301-redirect-checker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed up MySQL Call from PHP using mysql_unbuffered_query</title>
		<link>http://www.onlinecomputerlessons.com/speed-up-mysql-call-from-php-using-mysql_unbuffered_query/</link>
		<comments>http://www.onlinecomputerlessons.com/speed-up-mysql-call-from-php-using-mysql_unbuffered_query/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 16:41:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP Coding]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://onlinecomputerlessons.com/?p=20</guid>
		<description><![CDATA[MySQL_unbuffered_query can dramatically speed up your code When you make a call to mysql_query, all of the results get buffered to the server before continuing through the code. If you have a large result set, mysql_unbuffered_query() can speed up your process. Here is what php.net says: mysql_unbuffered_query() sends the SQL query query to MySQL without [...]]]></description>
			<content:encoded><![CDATA[<h4>MySQL_unbuffered_query can dramatically speed up your code</h4>
<p>When you make a call to mysql_query, all of the results get buffered to the server before continuing through the code. If you have a large result set, mysql_unbuffered_query() can speed up your process. Here is what <a title="MySQL unbuffered query" href="http://php.net/manual/en/function.mysql-unbuffered-query.php">php.net</a> says:</p>
<blockquote><p>mysql_unbuffered_query() sends the SQL query query to MySQL without automatically fetching and buffering the result rows as mysql_query() does. This saves a considerable amount of memory with SQL queries that produce large result sets, and you can start working on the result set immediately after the first row has been retrieved as you don&#8217;t have to wait until the complete SQL query has been performed. To use mysql_unbuffered_query() while multiple database connections are open, you must specify the optional parameter link_identifier to identify which connection you want to use.</p></blockquote>
<p>You can use this in your code like this: <strong>Do not forget to specify the link_identifier if using multiple connections.</strong><br />
<code>$result= mysql_unbuffered_query ("select SQL_CALC_ROWS id as number_of_rows, name from test");</code><br />
One other note: Note: With mysql_unbuffered_query(), You cannot use mysql_num_rows() but you can use SQL_CALC_ROWS on MySQL to get the total rows without the limit.</p>
<p><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fspeed-up-mysql-call-from-php-using-mysql_unbuffered_query%2F&amp;counturl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fspeed-up-mysql-call-from-php-using-mysql_unbuffered_query%2F&amp;count=horizontal&amp;text=Speed%20up%20MySQL%20Call%20from%20PHP%20using%20mysql_unbuffered_query: " frameborder="0" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fspeed-up-mysql-call-from-php-using-mysql_unbuffered_query%2F&amp;linkname=Speed%20up%20MySQL%20Call%20from%20PHP%20using%20mysql_unbuffered_query" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fspeed-up-mysql-call-from-php-using-mysql_unbuffered_query%2F&amp;linkname=Speed%20up%20MySQL%20Call%20from%20PHP%20using%20mysql_unbuffered_query" title="Reddit" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fspeed-up-mysql-call-from-php-using-mysql_unbuffered_query%2F&amp;linkname=Speed%20up%20MySQL%20Call%20from%20PHP%20using%20mysql_unbuffered_query" title="Digg" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fspeed-up-mysql-call-from-php-using-mysql_unbuffered_query%2F&amp;linkname=Speed%20up%20MySQL%20Call%20from%20PHP%20using%20mysql_unbuffered_query" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.onlinecomputerlessons.com/speed-up-mysql-call-from-php-using-mysql_unbuffered_query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replace text with a MySQL SQL statement</title>
		<link>http://www.onlinecomputerlessons.com/replace-text-with-a-mysql-sql-statement/</link>
		<comments>http://www.onlinecomputerlessons.com/replace-text-with-a-mysql-sql-statement/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 18:24:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://onlinecomputerlessons.com/?p=17</guid>
		<description><![CDATA[Many times you will need to replace or reformat some data in your MySQL table. The replace can be done quickly with the MySQL REPLACE() command that looks like: UPDATE `table_name` SET `field_name` = REPLACE(`field_name`, 'text to replace', 'new text'); Always make sure to update your tables before running any updates.]]></description>
			<content:encoded><![CDATA[<p>Many times you will need to replace or reformat some data in your MySQL table.  The replace can be done quickly with the MySQL REPLACE() command that looks like:<br />
<code>UPDATE `table_name` SET `field_name` = REPLACE(`field_name`, 'text to replace', 'new text');</code><br />
Always make sure to update your tables before running any updates.</p>
<p><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Freplace-text-with-a-mysql-sql-statement%2F&amp;counturl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Freplace-text-with-a-mysql-sql-statement%2F&amp;count=horizontal&amp;text=Replace%20text%20with%20a%20MySQL%20SQL%20statement: " frameborder="0" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Freplace-text-with-a-mysql-sql-statement%2F&amp;linkname=Replace%20text%20with%20a%20MySQL%20SQL%20statement" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Freplace-text-with-a-mysql-sql-statement%2F&amp;linkname=Replace%20text%20with%20a%20MySQL%20SQL%20statement" title="Reddit" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Freplace-text-with-a-mysql-sql-statement%2F&amp;linkname=Replace%20text%20with%20a%20MySQL%20SQL%20statement" title="Digg" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Freplace-text-with-a-mysql-sql-statement%2F&amp;linkname=Replace%20text%20with%20a%20MySQL%20SQL%20statement" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.onlinecomputerlessons.com/replace-text-with-a-mysql-sql-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set PHP Max Execution Time</title>
		<link>http://www.onlinecomputerlessons.com/set-php-max-execution-time/</link>
		<comments>http://www.onlinecomputerlessons.com/set-php-max-execution-time/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 17:43:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Coding]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[execution time]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[set_time_limit]]></category>

		<guid isPermaLink="false">http://onlinecomputerlessons.com/?p=10</guid>
		<description><![CDATA[The default max execution time defined in php.ini is 30 seconds. It is possible that you want to alter this max execution time at run time. To do this, insert the below code in your php file. set_time_limit ( int $seconds ) The number of seconds specified will be in addition to the time already [...]]]></description>
			<content:encoded><![CDATA[<p>The default max execution time defined in php.ini is 30 seconds.  It is possible that you want to alter this max execution time at run time.  To do this, insert the below code in your php file.<br />
<code>set_time_limit ( int $seconds )</code><br />
The number of seconds specified will be in addition to the time already used to execute the php script (the execution timer gets reset to zero when set_time_limit is called). </p>
<p><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fset-php-max-execution-time%2F&amp;counturl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fset-php-max-execution-time%2F&amp;count=horizontal&amp;text=Set%20PHP%20Max%20Execution%20Time: " frameborder="0" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fset-php-max-execution-time%2F&amp;linkname=Set%20PHP%20Max%20Execution%20Time" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fset-php-max-execution-time%2F&amp;linkname=Set%20PHP%20Max%20Execution%20Time" title="Reddit" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fset-php-max-execution-time%2F&amp;linkname=Set%20PHP%20Max%20Execution%20Time" title="Digg" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fset-php-max-execution-time%2F&amp;linkname=Set%20PHP%20Max%20Execution%20Time" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.onlinecomputerlessons.com/set-php-max-execution-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick PHP MySQL Connection Demo</title>
		<link>http://www.onlinecomputerlessons.com/quick-php-mysql-connection-demo/</link>
		<comments>http://www.onlinecomputerlessons.com/quick-php-mysql-connection-demo/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 17:35:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Coding]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql_connect]]></category>
		<category><![CDATA[mysql_select_db]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://onlinecomputerlessons.com/?p=8</guid>
		<description><![CDATA[Quick reference on how to connect to a MySQL database from PHP. There are other possibilities but this is a quick demo. $db_host="localhost"; $db_user="test"; $db_password="test"; $db_name="test"; mysql_connect($db_host,$db_user, $db_password) or die(mysql_error()); mysql_select_db($db_name) or die(mysql_error()); $result=mysql_query("select test from test_table"); while($row=mysql_fetch_array($result)) { echo $row['test'] , ''; }]]></description>
			<content:encoded><![CDATA[<p>Quick reference on how to connect to a MySQL database from PHP.  There are other possibilities but this is a quick demo.</p>
<pre><code class="php">$db_host="localhost";
$db_user="test";
$db_password="test";
$db_name="test";

mysql_connect($db_host,$db_user, $db_password) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
$result=mysql_query("select test from test_table");
while($row=mysql_fetch_array($result))
{
    echo $row['test'] , '';
}</code></pre>
<p><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fquick-php-mysql-connection-demo%2F&amp;counturl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fquick-php-mysql-connection-demo%2F&amp;count=horizontal&amp;text=Quick%20PHP%20MySQL%20Connection%20Demo: " frameborder="0" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fquick-php-mysql-connection-demo%2F&amp;linkname=Quick%20PHP%20MySQL%20Connection%20Demo" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fquick-php-mysql-connection-demo%2F&amp;linkname=Quick%20PHP%20MySQL%20Connection%20Demo" title="Reddit" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fquick-php-mysql-connection-demo%2F&amp;linkname=Quick%20PHP%20MySQL%20Connection%20Demo" title="Digg" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fquick-php-mysql-connection-demo%2F&amp;linkname=Quick%20PHP%20MySQL%20Connection%20Demo" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.onlinecomputerlessons.com/quick-php-mysql-connection-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display PHP Warning and Error Messages</title>
		<link>http://www.onlinecomputerlessons.com/hello-world/</link>
		<comments>http://www.onlinecomputerlessons.com/hello-world/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 20:37:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Coding]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://onlinecomputerlessons.com/?p=1</guid>
		<description><![CDATA[Many webhost have php set to suppress error message in the php.ini.  Often times, a shared hosting user will not have access to modify this file.  If you still need to see the php errors, warnings, and notices, php has provided another solution: error_reporting(E_ALL); ini_set("display_errors", 1); Make sure to set this at the top of [...]]]></description>
			<content:encoded><![CDATA[<p>Many webhost have php set to suppress error message in the php.ini.  Often times, a shared hosting user will not have access to modify this file.  If you still need to see the php errors, warnings, and notices, php has provided another solution:</p>
<pre><code class="php">error_reporting(E_ALL);
ini_set("display_errors", 1);</code></pre>
<p>Make sure to set this at the top of your document before any code has been outputted by the server.</p>
<p><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fhello-world%2F&amp;counturl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fhello-world%2F&amp;count=horizontal&amp;text=Display%20PHP%20Warning%20and%20Error%20Messages: " frameborder="0" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fhello-world%2F&amp;linkname=Display%20PHP%20Warning%20and%20Error%20Messages" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fhello-world%2F&amp;linkname=Display%20PHP%20Warning%20and%20Error%20Messages" title="Reddit" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fhello-world%2F&amp;linkname=Display%20PHP%20Warning%20and%20Error%20Messages" title="Digg" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.onlinecomputerlessons.com%2Fhello-world%2F&amp;linkname=Display%20PHP%20Warning%20and%20Error%20Messages" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.onlinecomputerlessons.com/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.onlinecomputerlessons.com/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

