Want to learn abit of mysql

smithy

designer.
Hi,

I was just wondering if anyone has found a simple tutorial to just create a database or something like it (sorry im not really into this programming stuff) but basically all i want is to show in the address bar something like this:

www.domainname.com/index.php?page=1

Thats basically all i want to do at the moment, and then like the page value could equal up to 100 or whatever number.

Any help would be greatful, thanks in advance !
 
First off, start by learning about databases in general, how to create them and how to search them:

http://www.geekgirls.com/menu_databases.htm

For a more thorough tutorial on SQL try "A Gentle Introduction to SQL" by Andrew Cumming of the School of Computing of Napier University, Edinburgh, UK, at this address:

http://sqlzoo.net

This is probably the best introduction to SQL available anywhere right now.

If you really want to get into database design and modelling this is one of the best resource on how to create and optimize databases, primarily because it is really short and concise, without any "fluff":

http://www.utexas.edu/its/windows/database/datamodeling/rm/overview.html

Stick to the headlines under "Relational model", and if you really get into it, then read the ones under "Data modeling" as well.

After this, you can take on MySQL. Get the installer from Marc Liyanage:
http://www.entropy.ch/software/macosx/mysql/

Also, get YourSQL, a free client application, from this address:
http://www.mludi.net/YourSQL/

Read Erik Wrenholts tutorial on how to connect to MySQL from PHP:
http://www.timestretch.com/site/web_dev_mysql_php/

If you install MySQL 4.1, and PHP 5, remember to use commands that start with "mysqli_" wherever Eriks code says "mysql_". Things changed between 4.0 and 4.1 in MySQL, and you need PHP 5 to connect to MySQL 4.1.

Hope this helps!
 
Create an index.php page, a home page, and a product page and have your way with the below code....

Sample link in your webpages:

<a href="index.php?page=home">HOME</a>
<a href="index.php?page=products">PRODUCTS</a>

Your index.php page can look like so...

$page_to_display = $_GET["page"];

if( !isset($page_to_display) ){
include("home.php");
}
else{
include("$page_to_display.php");
}

What you're referring to is not really a database...
 
Ah ok thanks for that, sorry i didn't thank you's earlier i was on holidays. But wnowak1, do you think you could point me to a tutorial that tells you how to do what you said by any chance ??
 
What exactly are you planning on doing? Do you need a database or do you have a bunch of files that you want links to?
 
Well just like normal pages, however i would just like to make some sites that are abit involved instead of the normal .htm or .html or whatever extension. I know that doing what i wish to do is way complex compared to just simply doing a .html or something but its just handy to know.

But like this is what i wish to do.

<a href="domainname.com/index.php?id=something">Blah</a>

And the id name which is something in this case (lol) will go to the something page and then it will vary depending on the id name.

Hope you understand my intentions ....
 
Back
Top