In this mini-tutorial I will try and show you the basics of MySQL, Integrating it with PHP is an entirely different story and I'll get to that in another tutorial.
How does it work
This will be the hardest part of the tutorial, but also the most basic part, that's why I put it in the beginning. If this is all clear to you, then you'll have no trouble understanding the rest of the tutorial.
MySQL is a language (Okay, seems I was wrong, thanks Ilias) in which you can interact with tables that are stored in databases. You can store all kinds of data in tables, from numbers to text and passwords to images. Tables have a simple layout:
Column
Column
Column
Row 1
(data)
(data)
(data)
Row 2
(data)
(data)
(data)
Every time you want to insert new data into your tables, you create a new row. These rows have different fields you can (should) fill in, called columns. Different kinds of data should go in different tables, a table layout for a default page with users would be something like:
news - stores the posts on the front page
comments - stores comments on news
members - stores user information (username, password, websites, etc.)
The main thing about this part is to remember that ROWS are inserted and the COLUMNS are defined when you create a table. When you request information from your table through the SELECT statement (we'll get to that later), it will return rows. Let's look at a dummy table
id
title
message
Row 1
1
DUMMY POST
Hello World
Row 2
2
Welcome!
Thanks for visiting
That's how I lay out my news tables usually. An id which is UNIQUE to each post, and increases automatically on each new post (AUTO_INCREMENT). The title, for storing the title, obviously, and message for storing the bulk of the post.
When I was stumbling around this morning, I came across a site which mentioned Fitt's Law:
"The time to acquire a target is a function of the distance to and size of the target."
This means that, when the distance becomes smaller and size becomes larger, then the time taken to acquire a target(link) will decrease. You can apply this to links really neatly. Let's see what I'm talking about:
In which the right navigation is, of course, far easier to navigate. The links you can click on are bigger (and that is obvious thanks to the "underline"), when you hover over a link, you are not obscuring the link text you might want to click and you're also bringing some structure into your webpage.
Really, if you have one of those auto-configuring programs that came with your graphics card, use it. Now!
I've just used mine, and the colours are so much more.. colourful and relaxing for my eyes, awesomeness-squared! It takes some getting used to, but it really is looking better. Also, I found out about some options that I hadn't seen before, such as start-bar transparency, window transparency, some neat mouse tricks, and much more!
Oh, why am I even starting this post? It's making me sad already...
If anything can drive me insane, it's horrible spelling or grammar, be it typo's or just a lack of understanding of the language you're trying to speak. Or the "lolcatspeak". Sometimes, it makes me lose faith in humanity. Argh the stupidity!
For me, personally, writing is not something I'm particularly good at, but I like my walls of text to be free of any spelling mistakes at least. The grammar is a second thing, but I'm trying to keep that nice and clean as well. When I'm bored, I write. That is why I started this blog, so I would have a place to write things! That's why I'm bothering you guys, and also why I have about five or six visitors per day. I can probably tell you the names of the visitors too: Joey, (Ilias?), "The_End", biotech, my parents(sometimes?) and maybe someone from the Universiteit van Amsterdam (UvA), since I'm keeping my school results on here.
I'll be discussing the google pagerank in this first part of the series.
What is Google PageRank
Google PageRank is how Google calculates a site's "importantness". It works based on a simple concept, if a lot of sites link to you, and you dont link to a lot of sites (relatively speaking) your site would be considered quite important, but if almost no page links to your site and your site links to a LOT of other sites, it would be considered unimportant.