<?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: mySQL Class Updated</title>
	<atom:link href="http://top-frog.com/2005/09/12/mysql_class_updated/feed/" rel="self" type="application/rss+xml" />
	<link>http://top-frog.com/2005/09/12/mysql_class_updated/</link>
	<description>Polluting the internet since 2004</description>
	<lastBuildDate>Tue, 07 Feb 2012 10:22:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: John Pennypacker</title>
		<link>http://top-frog.com/2005/09/12/mysql_class_updated/comment-page-1/#comment-617</link>
		<dc:creator>John Pennypacker</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://top-frog.com/?p=130#comment-617</guid>
		<description>mysql_real_escape_string is a tasty morsel!</description>
		<content:encoded><![CDATA[<p>mysql_real_escape_string is a tasty morsel!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Pennypacker</title>
		<link>http://top-frog.com/2005/09/12/mysql_class_updated/comment-page-1/#comment-618</link>
		<dc:creator>John Pennypacker</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://top-frog.com/?p=130#comment-618</guid>
		<description>oh, and if you&#039;re not doing it, here&#039;s a neat little check to ensure that the slashes haven&#039;t already been added and to remove them if they have been:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if(ini_get(&#039;magic_quotes_gpc&#039;)) {&lt;/p&gt;
&lt;p&gt;    $var = stripslashes($var);&lt;/p&gt;
&lt;p&gt;     }&lt;/p&gt;
&lt;p&gt;</description>
		<content:encoded><![CDATA[<p>oh, and if you&#8217;re not doing it, here&#8217;s a neat little check to ensure that the slashes haven&#8217;t already been added and to remove them if they have been:</p>
<p>if(ini_get(&#8216;magic_quotes_gpc&#8217;)) {</p>
<p>    $var = stripslashes($var);</p>
<p>     }</p></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn</title>
		<link>http://top-frog.com/2005/09/12/mysql_class_updated/comment-page-1/#comment-619</link>
		<dc:creator>Shawn</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://top-frog.com/?p=130#comment-619</guid>
		<description>I&#039;m using a slight modification of that:&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;//&#160;Stripslashes&#160;if&#160;magic&#160;quotes&#160;has&#160;already&#160;added&#160;them
if&#160;(get_magic_quotes_gpc())&#160;
&#160;&#160;&#160;&#160;{
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$d&#160;=&#160;stripslashes($d);
&#160;&#160;&#160;&#160;}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I&#8217;m using a slight modification of that:</p>
<p>
<pre>//&nbsp;Stripslashes&nbsp;if&nbsp;magic&nbsp;quotes&nbsp;has&nbsp;already&nbsp;added&nbsp;them
if&nbsp;(get_magic_quotes_gpc())&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$d&nbsp;=&nbsp;stripslashes($d);
&nbsp;&nbsp;&nbsp;&nbsp;}</pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://top-frog.com/2005/09/12/mysql_class_updated/comment-page-1/#comment-620</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://top-frog.com/?p=130#comment-620</guid>
		<description>Now Shawn. What exactly is this and how do I effectively use it? Explain it to me like a 2 year old, I&#039;m confused.</description>
		<content:encoded><![CDATA[<p>Now Shawn. What exactly is this and how do I effectively use it? Explain it to me like a 2 year old, I&#8217;m confused.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joey B.</title>
		<link>http://top-frog.com/2005/09/12/mysql_class_updated/comment-page-1/#comment-621</link>
		<dc:creator>Joey B.</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://top-frog.com/?p=130#comment-621</guid>
		<description>Here&#039;s as productive a comment you will out of me  on this one:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But, Tom! You are two! ;o</description>
		<content:encoded><![CDATA[<p>Here&#8217;s as productive a comment you will out of me  on this one:</p>
<p>But, Tom! You are two! ;o</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn</title>
		<link>http://top-frog.com/2005/09/12/mysql_class_updated/comment-page-1/#comment-622</link>
		<dc:creator>Shawn</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://top-frog.com/?p=130#comment-622</guid>
		<description>Tom, I could just tell you to RTFF - the instructions are at the bottom of the &lt;a href=&quot;http://gipetto.dyndns.org/files/scripts/dbConnect.class.phps&quot;&gt;source file&lt;/a&gt;. And I could just point you to the &lt;a href=&quot;http://gipetto.dyndns.org/archives/2005/06/17/my_MySQL_abstraction_class&quot;&gt;first article I wrote about it&lt;/a&gt;. ; )&lt;/p&gt;
&lt;p&gt;But, I&#039;ll see if I can explain it a bit differently. I&#039;m probably dumbing down a bit too much here so bear with me...&lt;/p&gt;
&lt;p&gt;Abstraction of any kind is a way to take a function, wrap it up in a user defined class &amp; function, and essentially redefine it. The benefit of this is that when you then use it around your site you can easily make updates to the one class and how it works to update the whole site. This is particularly beneficial when upgrading systems. For example, to move from mysql php functions in php4 to mysqli functions in php5 will require minor tweaks to this one file and I&#039;ll be off to the races on php5 and mysql-improved functions accross my site and in any other classes that use it to manage db connections in no time at all. Simple as that. Even if I need to retool it to work with postgres or mssql, a few tweaks to the existing functions and the site can talk to a different type of database (with little tweaks to the existing query strings of course).&lt;/p&gt;
&lt;p&gt;This particular class is for connecting to mysql databases. It is a class that takes most of the work out of pulling data from databases and makes it an easy switch to then write back into them (ie: use a simple read only user to do most of the calls and then use a seldom called read/write user when writing to the database is required). It manages everything from selecting the database, formatting returns into numbered or associative arrays, and even error reporting and emailing of errors to the site admin. All you have to do is make sure your server address, database name, usernames and passwords are good to go. While not perfect is does do a lot. Most settings can be overridden at runtime, or locked out by the admin so that anyone else using it on the server can&#039;t alter its usage. I&#039;ll make better provisions for mulitple databases in the future - I just got a good idea for it while writing this...&lt;/p&gt;
&lt;p&gt;Does that answer the question?</description>
		<content:encoded><![CDATA[<p>Tom, I could just tell you to RTFF &#8211; the instructions are at the bottom of the <a href="http://gipetto.dyndns.org/files/scripts/dbConnect.class.phps">source file</a>. And I could just point you to the <a href="http://gipetto.dyndns.org/archives/2005/06/17/my_MySQL_abstraction_class">first article I wrote about it</a>. ; )</p>
<p>But, I&#8217;ll see if I can explain it a bit differently. I&#8217;m probably dumbing down a bit too much here so bear with me&#8230;</p>
<p>Abstraction of any kind is a way to take a function, wrap it up in a user defined class &amp; function, and essentially redefine it. The benefit of this is that when you then use it around your site you can easily make updates to the one class and how it works to update the whole site. This is particularly beneficial when upgrading systems. For example, to move from mysql php functions in php4 to mysqli functions in php5 will require minor tweaks to this one file and I&#8217;ll be off to the races on php5 and mysql-improved functions accross my site and in any other classes that use it to manage db connections in no time at all. Simple as that. Even if I need to retool it to work with postgres or mssql, a few tweaks to the existing functions and the site can talk to a different type of database (with little tweaks to the existing query strings of course).</p>
<p>This particular class is for connecting to mysql databases. It is a class that takes most of the work out of pulling data from databases and makes it an easy switch to then write back into them (ie: use a simple read only user to do most of the calls and then use a seldom called read/write user when writing to the database is required). It manages everything from selecting the database, formatting returns into numbered or associative arrays, and even error reporting and emailing of errors to the site admin. All you have to do is make sure your server address, database name, usernames and passwords are good to go. While not perfect is does do a lot. Most settings can be overridden at runtime, or locked out by the admin so that anyone else using it on the server can&#8217;t alter its usage. I&#8217;ll make better provisions for mulitple databases in the future &#8211; I just got a good idea for it while writing this&#8230;</p>
<p>Does that answer the question?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://top-frog.com/2005/09/12/mysql_class_updated/comment-page-1/#comment-623</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://top-frog.com/?p=130#comment-623</guid>
		<description>Wow, it sounds rather very nice. I might have to see how I can work this one out with the CMS I&#039;m building. Hmm..</description>
		<content:encoded><![CDATA[<p>Wow, it sounds rather very nice. I might have to see how I can work this one out with the CMS I&#8217;m building. Hmm..</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Served from: top-frog.com @ 2012-02-09 23:19:48 by W3 Total Cache -->
