MySQL.. eh?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
__cLowN_pAiNt__
Forum Newbie
Posts: 2
Joined: Tue Jan 20, 2004 5:04 pm

MySQL.. eh?

Post by __cLowN_pAiNt__ »

ok b4 u take the piz i know only how to do basic php echo statements and comments, now before i go off and venture into php it might help me to have an understanding of MySQL because at the moment i havent got a clue about it and cant get any info from anyone it seems.

Its hard to say what i want to know really, i know what it does, i just dont understand how it works. Do you need to learn a language for the database? i mean, has it got its own language? and how do you operate a database and modify it, with what tools etc.

I plan to make stuff using databases that are set up for me online not ones i have to set up myself because i tried that and it was just baffling :x .

Thats all i want to know...
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Thats all i want to know...
That's an awful lot to want to know via a forum ;)

Here's a quick non technical overview that's not strictly accurate but it's an easy way to visualise 'stuff'.

Think of a database as a collection of special files that can be searched using a special language. That special language is called SQL (Structured Query Language). The language itself is like most languages in that it can go from very simple queries like 'SELECT * FROM foo' to much more complex ones. There's loads of tutorials out there that explain the language syntax ( http://www.sqlcourse.com is a good one along with the documentation at http://www.mysql.com).

There's many ways to 'operate' a database. With regards to MySQL specifically http://phpmyadmin.sf.net is a well used web based front end as is simple to use. You can also a mysql command prompt which is sort of like a special DOS prompt where you enter the sql commands directly.
I'd advise either phpMyAdmin or one of the other many gui/web based tools that are around. I hope this wasn't too simplistic for you and i hope it gives you a general idea of databases. Read the docs for a more 'correct/technical' explanation :o
</end bad explanation> ;)
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

Code: Select all

Do you need to learn a language for the database? i mean, has it got its own language? and how do you operate a database and modify it, with what tools etc.
first, yes, sql is it's own language. the manual you recieved with your mysql installation should be just what you need to start out.

you can find it ( on windows ) by going to C:\mysql_directory\docs\manual.htm

scroll down to like section 3.1 and begin to read.

it gives you the very basics of how to query a database, create/drop a database and table.

once you begin to understand it, just dive right into programming with it.

http://www.php.net/mysql is a good start

now, keep in mind it's gonna take a lot of practice and a lot of your own personal exploring to figureo ut how to use it.

the basics takes the longest, but once you do that you will be laughing at just how hard you thought it was... as it's very, very simple.

just don't make it out to be harder than it is. mysql and php are popular because quite frankly, they are so very easy to learn and use.

when you get comfortable with what you are doing, i'd recommaend getting a good book.

my first and only book has been : PHP & Mysql Web Development

it's the most comprehensive and thorough book i've found and it's great for both the novice and the proffessional.

more than aything, just try to figure it out on your own. then, try to just write a simiple script ( like a phonebook ) that uses myqsl to store all the people and phone numbers you need.

then, when you run into trouble, letu s knowand we'll help you out..


hope this helps.
__cLowN_pAiNt__
Forum Newbie
Posts: 2
Joined: Tue Jan 20, 2004 5:04 pm

Post by __cLowN_pAiNt__ »

Ive got a book on it called PHP and MySQL for dynamic websites, its a visual quickpro guide by larry ullman. I thought it might help me but i still get really confused when trying to install the stuff :S.

its so annoying cos im sure il be fine with the language i just cant get the stuff installed.

In the book it tells you how to install iis, im on windows xp home edition and i havent got iis. What shall i do! all guides i can find for apache and stuff i cant make out properly, if anyone knows a reaaaaly basic simple guide or something i can use it would help.
User avatar
Dr Evil
Forum Contributor
Posts: 184
Joined: Wed Jan 14, 2004 9:56 am
Location: Switzerland

Post by Dr Evil »

I strated off using EasyPHP.
This will install Apache, PHP, MySQL and configure them for you.

It saved precious time for me and I looked into configuration much later.

This remains for me the best solution to start off.

Dr Evil
fractalvibes
Forum Contributor
Posts: 335
Joined: Thu Sep 26, 2002 6:14 pm
Location: Waco, Texas

Post by fractalvibes »

SQL is pretty nuch the universal Relational Database language. To learn it will serve you well in many development environments, not just PHP. There is a standard, but as with most everything else, each vendor has its own flavor and dialects (extensions to the language.)
Just do a google search on SQL and you are bound to get a zillion results.

fv
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

If you plan to write php programs, you need to know how to create good relational database designs: http://www.oreilly.com/catalog/javadtab ... r/ch02.pdf
Post Reply