<?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>RubberNeck Designs &#187; MySQL</title>
	<atom:link href="http://www.rubberneckdesigns.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rubberneckdesigns.com</link>
	<description>Web Developer Notes &#38; Sharing</description>
	<lastBuildDate>Sat, 10 Apr 2010 15:22:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Navicat Connetion with MAMP Pro</title>
		<link>http://www.rubberneckdesigns.com/drupal-6/navicat-connetion-with-mamp-pro/</link>
		<comments>http://www.rubberneckdesigns.com/drupal-6/navicat-connetion-with-mamp-pro/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 16:43:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Drupal 6]]></category>
		<category><![CDATA[MAMP]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.rubberneckdesigns.com/?p=284</guid>
		<description><![CDATA[MAMP Pro has a lot of nice features. However, this means it changes things up a bit. How you make a connection with Navicat is one such example. So here is a quick helper post get Navicat up and running with MAMP PRo.
1) Add your information to the &#8220;Connection Properties&#8221; Pane as you normally would.

2) [...]]]></description>
			<content:encoded><![CDATA[<p>MAMP Pro has a lot of nice features. However, this means it changes things up a bit. How you make a connection with Navicat is one such example. So here is a quick helper post get Navicat up and running with MAMP PRo.</p>
<p>1) Add your information to the &#8220;Connection Properties&#8221; Pane as you normally would.</p>
<p><img class="size-medium wp-image-286 alignnone" title="Navicat Pane -General" src="http://www.rubberneckdesigns.com/wp-content/uploads/2010/02/Screen-shot-2010-02-13-at-12.02.48-PM-300x270.jpg" alt="Navicat Pane -General" width="300" height="270" /></p>
<p>2) Click on the &#8220;Advanced&#8221; pane and check the box next to &#8220;Use socket for localhost connection.&#8221;</p>
<p>3) Then for the &#8220;Socket File Path&#8221; field type the following path.</p>
<p>/Applications/MAMP/tmp/mysql/mysql.sock</p>
<p>The &#8220;Advanced&#8221; Pane should now look like this:</p>
<p><img class="alignnone size-medium wp-image-287" title="Navicat Advanced Pane" src="http://www.rubberneckdesigns.com/wp-content/uploads/2010/02/Screen-shot-2010-02-13-at-12.09.26-PM-300x263.jpg" alt="Navicat Advanced Pane" width="300" height="263" /></p>
<p>Click &#8220;OK&#8221; and you should be all set.</p>
<p><img class="alignnone size-medium wp-image-289" title="Navicat Connection Sucessfull" src="http://www.rubberneckdesigns.com/wp-content/uploads/2010/02/Screen-shot-2010-02-13-at-12.11.35-PM-300x265.jpg" alt="Navicat Connection Sucessfull" width="300" height="265" /></p>
<p>I hope this helps. Please feel free to make comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rubberneckdesigns.com/drupal-6/navicat-connetion-with-mamp-pro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Schema Data Structure Documentation in Drupal</title>
		<link>http://www.rubberneckdesigns.com/drupal-6/schema-data-structure-documentation-in-drupal/</link>
		<comments>http://www.rubberneckdesigns.com/drupal-6/schema-data-structure-documentation-in-drupal/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 23:06:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Drupal 6]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Drupal database scheme]]></category>
		<category><![CDATA[Drupal install file]]></category>
		<category><![CDATA[Drupal module install]]></category>

		<guid isPermaLink="false">http://rubberneckdesigns.com/?p=210</guid>
		<description><![CDATA[I have been working on a project on the Drupal 6 platform that requires the web application to recognize dynamically created sub-domains so the functionality of the database can be adjusted according to what sub-domain is in the current URL.
To get Drupal 6 to do this, I am creating a custom module. One of the [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a project on the Drupal 6 platform that requires the web application to recognize dynamically created sub-domains so the functionality of the database can be adjusted according to what sub-domain is in the current URL.</p>
<p>To get Drupal 6 to do this, I am creating a custom module. One of the things I have learned about creating a custom module in Drupal 6 is the implementation of the module&#8217;s “install” file.</p>
<p>If you create a module named say,  my_module.module then the module&#8217;s install file name would be  my_module.install and will reside in the directory named my_module located at&#8230;.</p>
<p>my_site/sites/all/modules/my_module</p>
<p><a href="http://http://drupal.org/node/323314">Drupal 6 Module Install File Documentation</a></p>
<p>The  .install file will be run by Drupal 6 the 1st time my_module has been enabled. The my_module.install file will then be used to run setup procedures as stipulated by your module. The most common task for the my_module.install file to perform is creating database tables and fields. There is no special syntax for the install file. It is simply a PHP file with a .install extension to properly identify it to the Drupal 6 platform.</p>
<p>There is special function used in the .install file called hook_schema(). Where hook would be replaced by the name of your module. For example, if  the module you create is named my_module, then you would create a PHP file and name it my_module.install. Inside that file you will create a function named  my_module_schema(). The my_module_schema() function is used to create arrays representingthe database tables you wish the module to create in the Drupal database. You can see how this works here.</p>
<h3>Why do it this way?</h3>
<p>Once you build the Drupal API Schema there is no more need for  separate CREATE TABLE or ALTER TABLE statements on each database. As a module developer, you only need to create a schema structure and/or use the Drupal Schema API functions, and Drupal takes care of the rest. This greatly simplifies  writing install and update functions.</p>
<p>This way of creating the module install files also allows for support in multiple database platforms.</p>
<p>According to Drupal&#8217;s Blog this also allows for “Several advanced capabilities, such as incremental database updates, a simple and consistent CRUD API, form scaffolding, simpler CCK and Views, schema and data validation, become much easier to implement in future enhancements.”</p>
<p><a href="http://http://drupal.org/node/146866">Schema Data Structure Documentation by Drupal</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rubberneckdesigns.com/drupal-6/schema-data-structure-documentation-in-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screen shot of the up and comming CPI Data Panel</title>
		<link>http://www.rubberneckdesigns.com/ajax-web-design/screen-shot-of-the-up-and-comming-cpi-data-panel/</link>
		<comments>http://www.rubberneckdesigns.com/ajax-web-design/screen-shot-of-the-up-and-comming-cpi-data-panel/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 14:24:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://rubberneckdesigns.com/?p=147</guid>
		<description><![CDATA[I havn&#8217;t posted in few weeks because I have been very busy with several projects. One of the projects I am particularly excited about the CPI panel. The Cpi panel is new &#8220;back end&#8221; for LoveFineArt.com. IT used to be that each and every product would take about 20 minuets to enter. With this new [...]]]></description>
			<content:encoded><![CDATA[<p>I havn&#8217;t posted in few weeks because I have been very busy with several projects. One of the projects I am particularly excited about the CPI panel. The Cpi panel is new &#8220;back end&#8221; for LoveFineArt.com. IT used to be that each and every product would take about 20 minuets to enter. With this new panel (incorperating secure AJAX), The products can be entered as fast as the site owner can type!</p>
<p>Here is a screen shot of the new back end.</p>
<dl id="attachment_148" class="wp-caption alignnone" style="width: 310px;">
<dt class="wp-caption-dt"><img class="size-medium wp-image-148" title="cpi_panel_screenshot_for_we" src="http://rubberneckdesigns.com/wp-content/uploads/2009/07/cpi_panel_screenshot_for_we-300x243.jpg" alt="Screen shot of the up and comming CPI Data Panel" width="300" height="243" /></dt>
</dl>
<p>I have also been busy learning the Drupal platform. AS I become more knowledgeable there will be posts and perhaps a special section on this blog devoted to cool new drupalistic methods and problem solving.</p>
<p>AS always, I invite you to leave a coment or sugestion or critisizm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rubberneckdesigns.com/ajax-web-design/screen-shot-of-the-up-and-comming-cpi-data-panel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Protect Against SQL Injection</title>
		<link>http://www.rubberneckdesigns.com/ajax-web-design/how-to-protect-against-sql-injection/</link>
		<comments>http://www.rubberneckdesigns.com/ajax-web-design/how-to-protect-against-sql-injection/#comments</comments>
		<pubDate>Thu, 07 May 2009 17:44:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Security]]></category>

		<guid isPermaLink="false">http://rubberneckdesigns.com/?p=74</guid>
		<description><![CDATA[One of the most common web security problems is SQL Injection. As the name implies, SQL injections works by introducing malicious SQL code where it doesn&#8217;t belong. Since it is SQL code you could probably guess that the attacker &#8220;injects&#8221; his poison via database queries. Web developers often pass some sort of variable to their [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most common web security problems is SQL Injection. As the name implies, SQL injections works by introducing malicious SQL code where it doesn&#8217;t belong. Since it is SQL code you could probably guess that the attacker &#8220;injects&#8221; his poison via database queries. Web developers often pass some sort of variable to their database queries. Very common are variables that are influenced by user input. User input, to variable, then to query,- get it? So, there is a need for a way of eliminating the user&#8217;s ability to manipulate the variable in any way that could effect the query.</p>
<p><strong>What Happens With SQL Injection</strong></p>
<p>By passing an unexpected string of code into a user input, such a form, an attacker send damaging code that causes an otherwise good query to go haywire. For example:<span id="more-74"></span></p>
<div id="attachment_73" class="wp-caption alignleft" style="width: 384px"><img class="size-full wp-image-73" title="code snippet sql injection unprotected" src="http://www.rubberneckdesigns.com.php5-5.dfw1-2.websitetestlink.com/wp-content/uploads/2009/05/picture-8.png" alt="unprotected query is vulnerable" width="374" height="18" /><p class="wp-caption-text">unprotected query is vulnerable</p></div>
<p>The above snippet of code works as long as users put in the expected information. An attacker, will instead, make clever use of a few extra characters. You likely know by now that SQL requires a semi-colon at the end of each query. PHP automatically adds it in if you omit it. Because of this, the attacker, by closing the string and using the closing parenthesis to finish the query followed by a semi colon, can add an additional query to drop the table.<img class="size-full wp-image-75" title="example of SQL Injection" src="http://www.rubberneckdesigns.com.php5-5.dfw1-2.websitetestlink.com/wp-content/uploads/2009/05/picture-9.png" alt="example of SQL Injection" width="349" height="14" /></p>
<div class="mceTemp">
<dl id="attachment_75" class="wp-caption alignnone" style="width: 359px;">
<dd class="wp-caption-dd"><span style="color: #888888;">example of SQL Injection</span></dd>
</dl>
</div>
<p>This is what we in the world of secure web development refer to as a &#8216;bad thing&#8217;!<br />
Scary isn&#8217;t it? Attackers have used this method to not only drop tables and destroy records, but also to retrieve highly sensitive information.</p>
<p><strong>How to Protect Against SQL Injection</strong></p>
<p>OK, after that scary bit of information, you&#8217;ll be glad to know that protecting yourself is really not all that hard. The hard part is always remembering when and where to do it.</p>
<p>Protecting against SQL Injection is a simple matter of calling a PHP function that renders data safe ( or cleansed ) for use in a query. There are a few methods for cleansing user input in PHP depending on the PHP extension you are using. We will be discussing the mysql extension.The name of the function is:<br />
<span style="color: #0000ff;">mysql_real_escape_string()</span>. Notice in this snippet how it is used:</p>
<div id="attachment_72" class="wp-caption alignnone" style="width: 480px"><img class="size-full wp-image-72" title="code snippet mysql_real_escape_string" src="http://www.rubberneckdesigns.com.php5-5.dfw1-2.websitetestlink.com/wp-content/uploads/2009/05/picture-7.png" alt="How to protect again SQL Injection" width="470" height="205" /><p class="wp-caption-text">How to protect again SQL Injection</p></div>
<p>See how easy it is?  Just take the user input (in this case a post ) and pass it through the <span style="color: #0000ff;">mysql_real_escape_string()</span> function, (as shown on line 7 ). Then use the &#8220;cleansed&#8221; variable in the query ( as shown on line 9 ).</p>
<p>It is so easy to protect against this, yet it is often overlooked or forgotten. SO remember to use <span style="color: #0000ff;">mysql_real_escape_string()</span> to cleanse your input to help guard against SQL Injection.</p>
<p>There is more to learn and be discussed so feel free to stop back or drop me any suggestions or tips to share.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rubberneckdesigns.com/ajax-web-design/how-to-protect-against-sql-injection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
