<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>DevTuts</title>
	
	<link>http://www.devtuts.com</link>
	<description>Develop your Potential</description>
	<lastBuildDate>Tue, 21 Feb 2012 17:46:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/devtuts/xyfh" /><feedburner:info uri="devtuts/xyfh" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>WAMPServer gets a facelift</title>
		<link>http://feedproxy.google.com/~r/devtuts/xyfh/~3/EDf5bkeEnis/</link>
		<comments>http://www.devtuts.com/2012/02/wampserver-gets-a-facelift/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 17:40:58 +0000</pubDate>
		<dc:creator>John O'Connell</dc:creator>
				<category><![CDATA[Article]]></category>

		<guid isPermaLink="false">http://www.devtuts.com/?p=90</guid>
		<description><![CDATA[I may be a little behind on this, but it&#8217;s been around a year since I&#8217;ve been to their website. WAMPServer, a nice bundle for Windows for Apache, MySQL, and PHP had a facelift on their website. Their old website was non informational, and not really up-to-date, but when I went to their site to [...]]]></description>
			<content:encoded><![CDATA[<p>I may be a little behind on this, but it&#8217;s been around a year since I&#8217;ve been to their website. <a href="http://www.wampserver.com">WAMPServer</a>, a nice bundle for Windows for Apache, MySQL, and PHP had a facelift on their website. Their old website was non informational, and not really up-to-date, but when I went to their site to grab WAMP for a computer, I noticed a lot has changed.</p>
<p>WAMPServer is very informative of the downloads, and even includes some PHP tutorials. WAMPServer makes installing the services very simple, and honestly, beats setting up individually. Though installing the services individually can be beneficial, for educational reasons, or for a very customized box &#8211; using this installer makes everything ever so better.</p>
<p>If you&#8217;re on a Windows Machine and need a PHP/Apache/MySQL bundle, make sure you give them a shot. You can also update your own versions of each. They&#8217;re are pretty easy to do. WAMPServer also comes along with SQLBuddy, and WebGrind. Both useful tools, but I prefer PHPMyAdmin over SQLBuddy.</p>
<img src="http://feeds.feedburner.com/~r/devtuts/xyfh/~4/EDf5bkeEnis" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.devtuts.com/2012/02/wampserver-gets-a-facelift/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devtuts.com/2012/02/wampserver-gets-a-facelift/</feedburner:origLink></item>
		<item>
		<title>Cron Jobs – Setting them up via command line</title>
		<link>http://feedproxy.google.com/~r/devtuts/xyfh/~3/HmjlSqS5YL8/</link>
		<comments>http://www.devtuts.com/2012/02/cron-jobs-setting-them-up-via-command-line/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 00:37:22 +0000</pubDate>
		<dc:creator>John O'Connell</dc:creator>
				<category><![CDATA[Site Administation]]></category>

		<guid isPermaLink="false">http://www.devtuts.com/?p=59</guid>
		<description><![CDATA[Ever wonder how to set up a Cron Job without a fancy GUI Cron Manager? It&#8217;s fairly simple, even if you&#8217;re afraid to touch the command line. Open up your server&#8217;s command line, and type This will list any cron jobs that currently exist. If you never made a cron job, don&#8217;t expect to see [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wonder how to set up a Cron Job without a fancy GUI Cron Manager? It&#8217;s fairly simple, even if you&#8217;re afraid to touch the command line. Open up your server&#8217;s command line, and type</p>
<pre class="brush: plain; title: ; notranslate">crontab -l</pre>
<p>This will list any cron jobs that currently exist. If you never made a cron job, don&#8217;t expect to see any returned. Let&#8217;s add a cron though. Type</p>
<pre class="brush: plain; title: ; notranslate">crontab -e</pre>
<p>This will open your default editor on your system, which for me is Nano. Here we can add cron jobs, save the file, and watch the magic happen.</p>
<p>Before we go any further, let&#8217;s understand the syntax that creates a cron job.</p>
<pre class="brush: plain; title: ; notranslate">
* * * * * command to be executed
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)</pre>
<p>So let&#8217;s say we want to run a file every day at 8am and 8pm. Let&#8217;s just say it&#8217;s a fictitious email that would be sent out with stats.</p>
<p>Our code would be:</p>
<pre class="brush: plain; title: ; notranslate">0 8,20 * * * /path/to/script.php</pre>
<p>One thing I like to do, is to add &gt;/dev/null 2&gt;&amp;1 after the file name. This will disable email output when the cron runs. By default, it will send an email to state the status of the cron job. So our code will be:</p>
<pre class="brush: plain; title: ; notranslate">0 8,20 * * * /path/to/script.php &gt;/dev/null 2&gt;&amp;1</pre>
<p>Save the file, and then let it run <img src='http://www.devtuts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  See below a useful link for reference.</p>
<p><a href="http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/" target="_blank">http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/</a></p>
<img src="http://feeds.feedburner.com/~r/devtuts/xyfh/~4/HmjlSqS5YL8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.devtuts.com/2012/02/cron-jobs-setting-them-up-via-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devtuts.com/2012/02/cron-jobs-setting-them-up-via-command-line/</feedburner:origLink></item>
		<item>
		<title>Breaking Ground on PHP: Day 2 – Variables</title>
		<link>http://feedproxy.google.com/~r/devtuts/xyfh/~3/I3VXN7uoqPA/</link>
		<comments>http://www.devtuts.com/2012/02/breaking-ground-on-php-day-2-variables/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 00:21:00 +0000</pubDate>
		<dc:creator>John O'Connell</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.devtuts.com/?p=81</guid>
		<description><![CDATA[Yesterday, we started to look at PHP. We&#8217;ve installed our servers, and ran our first PHP page. Though it was a mere &#8220;Hello World&#8221; example, it&#8217;s the basis of printing information on the screen. Today, I want to look over variables. Remember High School Algebra &#8211; a constant, usually represented by x,y,z or another letter, [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, we started to look at PHP. We&#8217;ve installed our servers, and ran our first PHP page. Though it was a mere &#8220;Hello World&#8221; example, it&#8217;s the basis of printing information on the screen. Today, I want to look over variables. Remember High School Algebra &#8211; a constant, usually represented by x,y,z or another letter, held a value. That value can change, or be manipulated. In the same format, we can create names, to hold values. We can name our variables with a single letter, a word, a camelCasedString, or even a underscore_seperated_words.</p>
<p>Let&#8217;s set a variable. For this example, we will name our variable name. We will set it to be the name of a friend. For me, I&#8217;ll name my friend George. Variables are denoted by a $ (dollar sign). All variables start with $.</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
$name = 'George';
?&gt;</pre>
<p>As you can see, we surrounded our value of the variable in quotes. This is just simply a string. We can set our variables to other items, such as functions, other variables, or even constants &#8211; but we haven&#8217;t gone over functions and constants, so we won&#8217;t worry about that. Let&#8217;s set a variable equal to another variable.</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
$varA = 'A value';
$varB = $varA;
?&gt;</pre>
<p>Great! We set two variables, and the second one is now equal to the first. Let&#8217;s double check, and echo out the variable.</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
$varA = 'A value';
$varB = $varA;
echo $varB;
?&gt;</pre>
<p>Now I have echoed out our variable, and we should see an output of &#8220;A value&#8221; (with no quotes). I&#8217;ve also introduced another way to use the echo command. Remember yesterday, we echoed out strings, surrounded by single or double quotes. When echoing a variable, you do not need to surround it in quotes.</p>
<p>Last thing I would like to discuss is the naming conventions for variables. It is important that you follow this format, or else your script will most likely not work.<br />
Variables must either start with a letter, or an underscore (_).<br />
Variables must be alphanumeric, such as A-Z, a-z, 0-9, and again, can have an underscore.<br />
Multi-word variables should be seperated by underscores (prefered), or camelCased.<br />
When making multi-word variables, you want to be descriptive, but SHORT. View examples below.</p>
<p>Good variables:</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
$my_number = 5;
$myNumber = 5;
$not_a_number = &quot;String&quot;
$my_number3 = 3;
$a = 1;
?&gt;</pre>
<p>Bad variables:</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
$4you = &quot;string&quot;; // Won't work, as it starts with a number
$first_name_of_registered_user_after_login_or_register = &quot;John&quot;; // Will work, but it is VERY long. $f_name = &quot;John&quot; would be better <img src='http://www.devtuts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
?&gt;</pre>
<p>Well, that was today&#8217;s short on variables.</p>
<img src="http://feeds.feedburner.com/~r/devtuts/xyfh/~4/I3VXN7uoqPA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.devtuts.com/2012/02/breaking-ground-on-php-day-2-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devtuts.com/2012/02/breaking-ground-on-php-day-2-variables/</feedburner:origLink></item>
		<item>
		<title>Breaking Ground on PHP: Day 1 – Installing, Our First Page</title>
		<link>http://feedproxy.google.com/~r/devtuts/xyfh/~3/fypauT19g4E/</link>
		<comments>http://www.devtuts.com/2012/02/breaking-ground-on-php-day-1-installing-our-first-page/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 00:18:47 +0000</pubDate>
		<dc:creator>John O'Connell</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.devtuts.com/?p=78</guid>
		<description><![CDATA[PHP has become a very large community supported language. It houses many large websites, Facebook for example, and is the basis of many new developers. I am going to go through and teach you how to start programming in PHP. I&#8217;ll assume you have an understanding of HTML. You don&#8217;t need to know HTML to [...]]]></description>
			<content:encoded><![CDATA[<p>PHP has become a very large community supported language. It houses many large websites, Facebook for example, and is the basis of many new developers. I am going to go through and teach you how to start programming in PHP. I&#8217;ll assume you have an understanding of HTML. You don&#8217;t need to know HTML to code PHP, but all your output will be most likely in an HTML/XML format. Granted you can output just plain text and write files, if you&#8217;re making a website, HTML is a must-know. These tutorials will eventually dabble into MySQL usage, but MySQL is not the only Database you can use. There are many engines that PHP supports. For a full list, please check out php.net.</p>
<p>Creating our first page/site.</p>
<p>To create a page, we will need to have a server with Apache to run PHP. Thankfully, there are a number or resources to do this. I will walk you through on how to make a development environment on your machine. This is great for testing, and debugging. If you have your own server, or are purchasing hosting, it is okay to test on those servers, but having a spot where you can test without constantly loading changes to your server, makes development quicker.</p>
<p>WAMP/MAMP/LAMP<br />
You can find programs that come bundled, and for this case, we&#8217;ll stick with them. If you noticed, all of these have AMP, which stands for Apache MySQL PHP. The M, L, or W stands for the machine you&#8217;re on. Mac, Linux, Windows. There is another popular one out there that is called XXAMP. Use whatever one suits you or your machine, but I will be creating a WAMP setup. Go to the respective site and download and install a copy of the program.</p>
<p>Let&#8217;s start our servers up! We need to have the Apache server running to use php. Without the Apache, we won&#8217;t be able to view a PHP page propperly. You should be able to go to http://localhost on your machine, or http://127.0.0.1</p>
<p>If these do not work, and you are told Apache is running, you&#8217;ll need to find the port it is running off of. MAMP defaults to port 8080, so your url would be http://localhost:8080.</p>
<p>Classic Hello World<br />
I guess it is accustomed to many programmers to make their first program that outprints a string. In our case, it will be the browser. So we&#8217;ll need to make a new PHP file. Under a normal install of WAMP, our directory where localhost points too is C:\www\ and for Mamp, it is Applications\MAMP\htdocs\<br />
In here, we&#8217;ll create a folder, called learningPHP. We&#8217;ll keep all our files inside it&#8217;s own folder so that way we don&#8217;t clutter the main directory with a bunch of excess files. Let&#8217;s finally create our page. Open up an editor, and save a file called index.php</p>
<p>Let&#8217;s write 3 lines of code. The first and last are going to be PHP tags. The opening tag will declare that we will have a &#8220;block&#8221; of PHP code, and the ending tag is declaring that the block of PHP code has ended. You can have a billion blocks of PHP on one page if you want, but you probably will never need that amount.</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
echo 'Hello World';
?&gt;</pre>
<p>Let&#8217;s discuss the PHP tags first. I&#8217;ve already pointed out that they are on the first and 3rd lines of this code segment. If you follow other tutorials, you may see them use short tags: <? and ?> . My tip of advice here is to NEVER use shorttags. One, don&#8217;t be lazy. Typing <? does not make your code faster. Use the full <?php tag. Secondly, NOT ALL HOSTS SUPPORT SHORT OPEN TAGS. I repeat, not all hosts support the short open tags. If you want to save yourself, and clients headaches, use a full php opening tag.</p>
<p>Now, the second line in our code block there is where the fun begins. We are doing nothing but a simple echo command. Echo pretty much prints information to the browser. Our string of text is surrounded by single quotes. Double quotes can be used here, but it depends on the content inside the string. For this example, Single or double quotes will work fine. Below is another example.</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
echo 'This string is inside single quotes';
echo &quot;This string is inside double quotes&quot;;
?&gt;
</pre>
<p>As you noticed, if you ran this example, your output would be: &#8220;This string is inside single quotesThis string is inside double quotes&#8221;. Let&#8217;s add an HTML break line tag in the first string, and you will get the output on two lines.</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
echo 'This string is inside single quotes&lt;br /&gt;';
echo &quot;This string is inside double quotes&quot;;
?&gt;
</pre>
<p>That is as far as Day 1 will go. I want to keep these tutorials quick and simple. In Day 2, we&#8217;ll look into variables, and continue expanding on printing out information to the screen.</p>
<img src="http://feeds.feedburner.com/~r/devtuts/xyfh/~4/fypauT19g4E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.devtuts.com/2012/02/breaking-ground-on-php-day-1-installing-our-first-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devtuts.com/2012/02/breaking-ground-on-php-day-1-installing-our-first-page/</feedburner:origLink></item>
		<item>
		<title>SQL Syntax and Creating a Table</title>
		<link>http://feedproxy.google.com/~r/devtuts/xyfh/~3/Z6wmjsVuFtU/</link>
		<comments>http://www.devtuts.com/2011/11/sql-syntax-and-creating-a-table/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 22:30:32 +0000</pubDate>
		<dc:creator>John O'Connell</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.devtuts.com/?p=53</guid>
		<description><![CDATA[Introduction At the beginning of these tutorials, I will provide the basic syntax needed to do what our objective is. It will be generic, but it will be a nice overview into what you need to follow when writing your own SQL. Data that you will need to alter or insert will be surrounded in [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>At the beginning of these tutorials, I will provide the basic syntax needed to do what our objective is. It will be generic, but it will be a nice overview into what you need to follow when writing your own SQL. Data that you will need to alter or insert will be surrounded in &lt; &gt;. I&#8217;ll be following the format found on the MySQL website. Content in [ ] are usually optional &#8211; as in the PHP website regarding functions.</p>
<h2>SQL</h2>
<p>SQL syntax has a huge advantage as it is EASILY readable by the human eye. There are no hidden secrets. It&#8217;s pretty much writing in english what you want to do. MySQL has some reserved words, which I won&#8217;t list in a list, but if you see words in capital letters, then you should understand that this is a keyword in MySQL. For example, I will put two queries below that perform different functions. I&#8217;ll then identify the components afterwords.</p>
<pre class="brush: sql; title: ; notranslate">SELECT * FROM `news`

SELECT `id`, `author` FROM `news` ORDER BY `id` DESC</pre>
<p>Now I hope I didn&#8217;t confuse you. We&#8217;ll study these queries in later tutorials, but their main purpose is to pull data from a database. First we say to SELECT the data. The next thing we write is what we want to select. In the first one, I used an asterix (*) which means all. I want to select all data. The second query, I specified fields (columns) I wanted from the database. It is best to select columns if you are not using all the information. This will speed up your queries. My third step is to tell it FROM. So up to this point, I am saying SELECT [data] FROM&#8230;</p>
<p>For this example, I have a table called news. I want to SELECT [data] FROM [tabdle]. The first example will return data in the way it seems fit, usually the first in is the first out. The second one, I tell it how to ORDER BY. I am telling it to sort the data to my liking. DESC means descending.</p>
<h2>Creating that table</h2>
<p>I strongly advise people new to SQL, and creation of tables to use the GUI editors, like PHPMyAdmin. These editors make it a simple set of clicks to create the table. But before we actually build our table, we need to build a structure &#8211; on pen and paper. We have to know what we want to store in our database. So for the remainder of this tutorial, our focus will be on setting up a blog. Our blog will be very simple, and you can easily expand on it. It will be remaining simple for the simplicity of learning.</p>
<p>What do we want to be in our blog? We&#8217;ll need basics like the blog post, author, and the time it was posted. We could create a more detailed system to include categories, and such, but let&#8217;s keep it simple. We will also need another column that no one sees. We&#8217;ll call it &#8220;id&#8221;. This will help keep each row unique, and will be great for ordering content. Many tables had an id field, which upon a slightly more advanced approach, id&#8217;s can be used to join tables together. We&#8217;ll get to that later.</p>
<p>Now we know what we want to have in our database, we have to know how that data will look like. id will be a number (more specifically, an integer (INT)). Our author&#8217;s name will most likely be under 255 characters, so we can safely say that our author field will be a VARCHAR of 255. Our blog post can be really big, or it can be really small. We&#8217;re not sure until the author writes it. To play it safe, we&#8217;ll make this one a BLOB. Let&#8217;s say we want to capture the date in seconds via the PHP function time(). So we know that will be an interger (INT), but we will make it a VARCHAR as the time will become a very large INT.</p>
<p>If I lost you on the capital words, it&#8217;s okay. Columns inside tables have data types. These types are based on what you want stored. This is a critical part of designing a database. For example, VARCHAR can hold up to 255 characters. But, just because it can doesn&#8217;t mean we should allow it to. Let&#8217;s say we wanted only a &#8220;yes&#8221; or &#8220;no&#8221; answer. Our biggest answer is 3 characters, so we would create a VARCHAR of 3 characters. Placing limits on the columns will also prevent unwanted entries. You can read up more on datatypes on the MySQL website as it is really a whole lesson that can be devoted to just data types. The most common ones I would say are INT, VARCHAR, TEXT, and BLOB.</p>
<h2>Let&#8217;s build that table now</h2>
<p>In PHPMyAdmin, you&#8217;ll want to create a database. There is an input box to create a database. Type a name in there and hit enter. You&#8217;ll now be in your database. If you have one already set up, or want to switch to another database, use the drop down menu on the left side.</p>
<p>To create a table, we will follow the same format pretty much. There will be a input box for the name, which we can call blog, and then it will ask for how many columns. For our example, we want 4. It will also ask you what kind of database we want &#8211; select InnoDB. Hit enter. We will now be brought to a screen where we can insert a lot of information. Under &#8220;Field&#8221;, type our four column names: id, blog, author, dateposted.</p>
<p>Also, change the types to what we chose. INT, BLOB, VARCHAR, VARCHAR respectively. INT and VARCHAR need a length specified. Let&#8217;s put 11, ,255,12 respectively. Remember, BLOB does not get a value. Under &#8220;Extra&#8221;, select &#8220;auto_increment&#8221; for the id field ONLY!</p>
<p>Click Save, and you should see a success message with the SQL that it ran to create the table. As I said, it is pretty straight forward, and can be read without deciphering anything. Let&#8217;s take a look at our SQL.</p>
<img src="http://feeds.feedburner.com/~r/devtuts/xyfh/~4/Z6wmjsVuFtU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.devtuts.com/2011/11/sql-syntax-and-creating-a-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devtuts.com/2011/11/sql-syntax-and-creating-a-table/</feedburner:origLink></item>
		<item>
		<title>Setting Up Your Database</title>
		<link>http://feedproxy.google.com/~r/devtuts/xyfh/~3/xPdFaq_g7X8/</link>
		<comments>http://www.devtuts.com/2011/11/setting-up-your-database/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 22:29:10 +0000</pubDate>
		<dc:creator>John O'Connell</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.devtuts.com/?p=50</guid>
		<description><![CDATA[Get your credentials Setting up your database can be an easy task, or a hard one. This process will vary from host to host. If you want to install it yourself on your computer, please refer to installation manuals provided. If you are using a WAMP, LAMP, or MAMP stack, then with that installation, MySQL [...]]]></description>
			<content:encoded><![CDATA[<h2>Get your credentials</h2>
<p>Setting up your database can be an easy task, or a hard one. This process will vary from host to host. If you want to install it yourself on your computer, please refer to installation manuals provided. If you are using a WAMP, LAMP, or MAMP stack, then with that installation, MySQL is already set up. You will need three things with your database -</p>
<ul>
<li>Username</li>
<li>Password</li>
<li>Host</li>
</ul>
<p>If you are on a local machine running a stack, usually by default the host is &#8216;localhost&#8217;, the username is &#8216;root&#8217;, and the password is blank. If you changed these settings during installation, then they will be what you chose them to be. If you are using a webhost, please refer to their support to grab these credentials. If you are on a live webserver that can be accessed by other people (even if they are not aware of the domain) &#8211; <strong>DO NOT ALLOW NO PASSWORD ACCESS</strong> Most hosting companies won&#8217;t even give you root access, nor allow no password, but incase you are setting up your own server, do not have a blank password.</p>
<h2>Check</h2>
<p>Check to make sure you do have the credentials to log in. If you are running a WAMP, LAMP, or MAMP stack, you already have PHPMyAdmin. This is located at <a href="http://localhost/phpmyadmin." rel="nofollow" target="_blank">http://localhost/phpmyadmin.</a> (MAMP uses :8080 I believe). Load up phpmyadmin in your browser and try logging in. If you are successful, then we are good to go. If you are getting errors, please refer to the error you get, and the links it will provide for you to check out why you are getting those errors.</p>
<h2>What&#8217;s next?</h2>
<p>In the next tutorial, we will begin creating a table, and starting to learn the syntax to write SQL. After that, we will connect to our databases via PHP &#8211; learning the functions as well.</p>
<img src="http://feeds.feedburner.com/~r/devtuts/xyfh/~4/xPdFaq_g7X8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.devtuts.com/2011/11/setting-up-your-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devtuts.com/2011/11/setting-up-your-database/</feedburner:origLink></item>
		<item>
		<title>Introduction to MySQL</title>
		<link>http://feedproxy.google.com/~r/devtuts/xyfh/~3/-N_pHUhrOMw/</link>
		<comments>http://www.devtuts.com/2011/11/introduction-to-mysql/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 22:27:44 +0000</pubDate>
		<dc:creator>John O'Connell</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.devtuts.com/?p=47</guid>
		<description><![CDATA[&#160; What is MySQL? MySQL is &#8220;The world&#8217;s most popular open source database.&#8221; MySQL is popular among the PHP community as it provides high performance, reliablity, and is very easy to use. Sites like Facebook and Google utilize the capabilities of MySQL. MySQL is not the only type of database that PHP works with. PHP [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<article>
<h2>What is MySQL?</h2>
<p>MySQL is &#8220;The world&#8217;s most popular open source database.&#8221; MySQL is popular among the PHP community as it provides high performance, reliablity, and is very easy to use. Sites like Facebook and Google utilize the capabilities of MySQL. MySQL is not the only type of database that PHP works with. PHP also works with Oracle (and others). Oracle is usually found on enterprise levels as licensing costs can get pretty pricey. If you develop on your own computer, or even most hosting sites will have a WAMP or LAMP setup. This means Windows Apache MySQL PHP or Linux Apache MySQL PHP. MySQL runs on over 20 platforms including Windows, Linux, and Mac.</p>
<h2>What is a database?</h2>
<p>A database is a place where you can store data securely, and idealy. There are other ways to store data, but the most beneficial is a database. Databases will have have tables, where you can organize your data in there. Each table will have columns and rows. Columns are the things you want to store, and the rows are the data. (Just like a normal table). Databases do require structure, and must be secured. When you store data in a database, you must have all identifying items one-way encrypted. MySQL won&#8217;t force you to, but as a developer, you should encrypt data such as passwords. We&#8217;ll talk more about what needs to be encrypted, and what needs to be altered for smooth databse operations.<br />
MySQL is known as a Relational database. A relational database is what I described above, with tables, and columns. There are other kinds of databases if you would like to research on your own time. I find it more knowledge than applicable.</p>
<h2>Administration of databases</h2>
<h3>DBA</h3>
<p>One important thing with databases is there needs to be an administrator. This person usually structures the database, and makes sure everything runs smooth. Most of the time, this is the responsibility of the web developer &#8211; but some companies will hire Database Administrator (DBA). These tasks can be time consuming in a company as if you are the only DBA, and an application goes down in the middle of the night &#8211; You have to get up and fix it. Small applications usually don&#8217;t have DBA&#8217;s or DBA&#8217;s that work stressful hours &#8211; but DBA&#8217;s do get their share on payday!</p>
<h3>Tools</h3>
<p>If you do a quick google search for &#8220;MySQL admin tools&#8221;, you&#8217;ll find quite a few options.</p>
<ul>
<li>PHPMyAdmin</li>
<li>Navicat</li>
<li>SQLBuddy</li>
</ul>
<p>PHPMyAdmin is my personal favorite one. Be careful of ones that say they&#8217;ll build a query for you. Computer logic never exceeds human logic. It can only match the logic of its developer. PHPMyAdmin is a free tool, and I will be using it for these tutorials. If you prefer another one that is okay. You can also maintain databases via command line. I will not be covering any commands needed to create or execute queries.</p>
<h2>Why use databases?</h2>
<p>I hope you can answer this question. If not, I&#8217;ll help you. As of now, your content is known as static. It doesn&#8217;t change unless you edit it. It is &#8216;hard-coded&#8217; in your script. That just won&#8217;t do for us. You&#8217;re tired of editing pages to meet updates. Databases store content &#8211; content your site can read from. Let&#8217;s say you want to make a blog, or a mailing list, or even a usersystem &#8211; you need to store that information somewhere. A database driven website is often known as dynamic. A dynamic site is changeable by the content it grabs from. Storing information in databases can also provide you access to run reports on sales, or visitors, or percentage of visitors to registrations. Databases are convienent.</p>
</article>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/devtuts/xyfh/~4/-N_pHUhrOMw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.devtuts.com/2011/11/introduction-to-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devtuts.com/2011/11/introduction-to-mysql/</feedburner:origLink></item>
		<item>
		<title>Launch</title>
		<link>http://feedproxy.google.com/~r/devtuts/xyfh/~3/qqxoksvhRyM/</link>
		<comments>http://www.devtuts.com/2011/11/launch/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 02:20:59 +0000</pubDate>
		<dc:creator>John O'Connell</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://www.devtuts.com/?p=41</guid>
		<description><![CDATA[DevTuts is launching. We&#8217;ll be working hard to bring you the highest quality tutorials you can find on the internet. Our goal is to not just teach you tricks and shortcuts, or samples of what you can do with code -  but to teach you real world examples, and how to really build a site [...]]]></description>
			<content:encoded><![CDATA[<p>DevTuts is launching. We&#8217;ll be working hard to bring you the highest quality tutorials you can find on the internet. Our goal is to not just teach you tricks and shortcuts, or samples of what you can do with code -  but to teach you real world examples, and how to really build a site from the ground up. We&#8217;ve seen many sites where developers copy and paste code snippets from 40 different sites. Not only does this look horrible when someone reviews the code, but it&#8217;s very insecure and the website would not fully function. Bugs would be coming out of it from every direction.</p>
<p>We currently plan to focus on CodeIgniter, as this promising framework only becomes more popular. We also feel that we should make tutorials for this, as most tutorials are for below the current version of CodeIgniter. Due to code changes, a lot of requests I see are resulting in the varying code as people are using the older tutorials.</p>
<p>We do take requests. If you want to see a tutorial on anything we aren&#8217;t covering, just let us know and we&#8217;ll be happy to find the resources to write up a tutorial on what it is you want to know. If you are looking to support DevTuts by writing quality tutorials, let us know as well. We could always use a hand, and you can get your name out there in the process.</p>
<p>Until next time, have fun everyone. Tutorials will be coming online in a bit. Just have to currently work on some layout concerns.</p>
<img src="http://feeds.feedburner.com/~r/devtuts/xyfh/~4/qqxoksvhRyM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.devtuts.com/2011/11/launch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.devtuts.com/2011/11/launch/</feedburner:origLink></item>
	</channel>
</rss>

