Click to See Complete Forum and Search --> : PHP and ??MySQL??
Daniel T
01-16-2004, 07:54 PM
hey
i just got a book on php(core php programming 3rd edition) in an attempt to learn how to use the language. im not far enough into the book to no wut it is at all, but there have been several references to "MySQL" in association with php. it also says that MySQL is not included in the book. i would like 2 no wut MySQL is and if ill need to use it in the furure or not.
thanx,
-Dan
The Cheat
01-16-2004, 09:27 PM
It's a database - http://www.mysql.com
Whether you need to use it depends... I would reccomend using a mysql database if you plan on creating dynamic web apps, for example, a guestbook...
If you do any serious work at all with PHP, you will amost be gaurenteed to need a database of some sort - MySQL being the obvious choice, to start with, as it is so well integrated. For now, however, I'd recommend just concentrating on learning PHP, and let MySQL go for a while.
joyforlife
01-17-2004, 09:05 AM
MySQL is one of many database types you can use in conjunction with PHP. It is the most common and as far as I know, the easiest to learn.
I am just now learning PHP as well. But I have read and I have been told that it is wise to learn mySQL first, and then learn PHP. That is, if you want to use PHP in relation to a database.
So, in other words, if you want to use PHP to create an interactive web site, such as a password protected area, or to gather information from customers into a db, or to create an online catalog, etc., it would be wise to get your db knowledge down first.
Otherwise, you'll be learning how to add and extract info to and from a database, but you won't know how to create a database! Good luck anyway. I am here to ask newbie questions about mySQL. We're in the same boat it seems. :-)
Daniel T
01-17-2004, 09:08 AM
thanx evry1:D
-Dan
Originally posted by joyforlife
But I have read and I have been told that it is wise to learn mySQL first, and then learn PHP.I disagree. Learn the basics of PHP first. Don't necessarily concentrate on any of the database specific functions, but learn how the language works, and how to get around in it. Once you have that down, then go back and learn MySQL and the PHP functions that relate to it.
Daniel T
01-17-2004, 09:16 AM
any1 no of any good books on MySQL for future reference?
-Dan
joyforlife
01-17-2004, 09:26 AM
Whenever I want to learn something new I almost always start out with the "for dummies" series. They are simple to understand and give a good base of knowledge to then jump to more complex books.
As far as the opinion to learn PHP first, I respect that. But it is an opinion. I have skimmed through a dozen or more books at Barnes and Noble on PHP and MySQL and if there was a general preference from the authors it was to know some MySQL first.
I guess that's what makes the world go 'round.
Good luck!
Paul Jr
01-17-2004, 11:20 AM
I'm not sure about learning MySQL first. There's not much you can do with a DataBase if you don't have a ServerSide Language to go with it...
joyforlife
01-17-2004, 12:22 PM
OK, fine. At the risk of sounding flippant...tell that to the 5+ book authors who recommended it. LOL
And again, I prefaced my recommendation in an earlier post by saying:
"if you want to use PHP to create an interactive web site, such as a password protected area, or to gather information from customers into a db, or to create an online catalog, etc., it would be wise to get your db knowledge down first"
Because if you do need a database for your web application,
what good is PHP without the db? A db is such a basic foundation for a web application.
But, if you are not going to use PHP in conjunction with a db, then of course, skip the db!
I guess it all comes down to the age-old question: Which came first? The chicken or the egg? ;)
DARTHTAMPON
01-17-2004, 08:27 PM
I'm not sure about learning MySQL first. There's not much you can do with a DataBase if you don't have a ServerSide Language to go with it
well first of all stick to standard sql (structured quiery language). I belive that learning quierys is a good first step. It is tough to do anything dynamic with out a database (maybe just use lots of flat files ;) ). look for a good standard sql book because when you get into the varients (mysql, pl/sql, etc) you learn things that may not work on every system. once you have sql down learning and using php with databases will be no problem. If you go the other way aroud you will find it tough to do anything on the web.
john
DARTHTAMPON
01-17-2004, 08:33 PM
I guess it all comes down to the age-old question: Which came first? The chicken or the egg?
the chicken was in the egg
Paul Jr
01-17-2004, 08:38 PM
Originally posted by DARTHTAMPON
the chicken was in the egg
The egg was in the chicken.
Also, I don't see how learning PHP, then MySQL can be tough. There are more things you can do with PHP alone than you can with MySQL alone. And more usefull things, I would think, too.
joyforlife
01-17-2004, 10:38 PM
If the chicken was in the egg, who laid the egg?
Anyhoo, all I was saying was that IF your primary goal...which mine is...were to have a database driven site powered by PHP, then it might not be a bad idea to learn mySQL first. If NOT, then OBVIOUSLY learn PHP first.
I mean, if you know nothing about how a database works, or how it is going to be set up, how and why would you learn to interact with the database first?
I guess it's just the way I learn. I learn a new skill when I have the task before me. I'm not into learning for theory. I have something tangible to do.
So, right now, I need to build an online catalog. Logically, I would figure out what I want to have in my database and how it is going to be set up before I would want to learn the more complex task of interacting with it and moving data, etc.
Does this not make sense to anyone?? C'mon people, throw me a bone here.
:p
Paul Jr
01-17-2004, 10:49 PM
Lol. Exactly my point (about the chicken). ;)
Okay, you are beginning to make a bit more sense here. But I'm already down the path of learning PHP, and there's no way I'm going back now. :D
I'll trudge through it, then learn MySQL when I'm done.
Besides, according to most everyone here, I like doing things the hard way (I'd rather use Notepad). :p
My personal opinion is that unless the person learning PHP and MySQL/any other DB already has a knowledge of some other programming language, they are not going to be able to just jump into a complex project. This is why I recommend learning PHP first. They can try some simple stuff first, such as counters, form mailers, etc. Once they have some of the basics of the language down, and feel comfortable with it, they can then learn how to create and interact with a database. I think that assuming that a n00b to PHP is going to be able to immediatly jump into a complex project is rediculous.
joyforlife
01-18-2004, 10:45 AM
OK, pyro. It's ridiculous. You win.
Just stating my own opinion. No one has to agree with it.
joyforlife
01-18-2004, 11:19 AM
Yes, it's your opinion. Just like I had mine. But I didn't call yours "ridiculous". Anyway, before this gets all hot-headed, let's just call it quits and agree to disagree. It's all good.
Sounds like a good plan to me. Cheers. :)
Daniel T
01-18-2004, 02:09 PM
heh heh:D that does sound like a good idea! thanx evry1, i think ill stick to pyro's opinion, cuz he seems 2 really no his stuff(not that evry1 else doesnt). also, i dont wanna have to go out and buy another book before i can use the one i already have. again, thanx for evry1's help on this!
-Dan
ps: the chicken came first!:D