I'm new to databases, I would like to learn

They have: 37 posts

Joined: Aug 2002

Ok. I'm new to databases. I have just about managed to install two scripts that use mySQL (phpbb and ShoutBox). But I would like to know hwo to use them a bit.

So all you experts out there, can you give me an example of say..:
You have a form, you can put your name down, it then enters that into the mySQL database.... when I go to page show.php or .html. It shows up all the names in the database.

I know I should probably learn a bit about other databases first but, since I've used mySQL already, I want to learn more, and I find the easiest way to learn is to see a few scripts and work out how they work.

Thanks in advance.

[Josh]

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

The first thing to learn is some basic SQL. Learning stuff like SELECT, INSERT, UPDATE, DELETE, JOINS etc. are a good start. Then figure out how to handle relationships between tables. Beginning people to SQL tend to make their databases with only one or two tables. The key thing is to try to avoid redundancy in your database. I tend to see a lot of people that can write some pretty good code like PHP, Perl but their SQL is pretty poor.

Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

The mySQL documentation isn't the best, and I've had a few questions which I could not answer by scouring them, but they do serve as a good cheat sheet.

You might want to check http://www.HotScripts.com and download a guestbook or some other simple script that you can dig into.

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 37 posts

Joined: Aug 2002

Hi, thanks for the help, I will read through the a simple script and the documentation. Then I will have a go at doing a basic script!

They have: 37 posts

Joined: Aug 2002

Ok. I've followed a bit of advice. I've managed to create two php/mySQL scripts which create a table in my database then insert a few fields. If say my field was called "name". If I wanted to create a form which I could fill in which would then enter the data into the database how would I do it? Thankyou

[Josh]

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

Check out this link at mysql.com:

http://www.mysql.com/articles/ddws/24.html

Just modify it to work with your tables.

They have: 37 posts

Joined: Aug 2002

Thanks that page looks really helpful. Now I've got a few tutorials and that, I should be able to make something.

They have: 112 posts

Joined: Apr 1999

Try visiting sites like devshed.com, sitepoint.com, phpbuilder.com, faqts.com

you can learn a great deal of MySQL stuff there.

They have: 37 posts

Joined: Aug 2002

Ok. I will give those ago. I found the mySQL tutorial (all of it), how should I put it, a bit long winded. I'm going to have a crack at making a basic guestbook. Just user and email and message posted. Then shown on another page. I will also make a Install Page. I would apprieciate it, that if I finish it someone could test it, see if it works, and see I I made any mistakes in the code.

Thanks for all your help with this.

[Josh]

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

I recommend you read Kevin Yank's tutorial on webmasterbase/sitepoint.

http://www.webmasterbase.com/article/228

It's pretty short and basic compared to most others. I think it's a good intro for newbies. Smiling

They have: 37 posts

Joined: Aug 2002

I will loook at that =thanks.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.