Hi guys,
I'm currently really hooked on learning PHP/MyQSL. I've been reading a bit of tutorials/beginner guids for the past two years really occasionally, only now really eager to learn. I noticed from the past that you really need to write some code in order to get the hang of it. That's the reason why I'm 'building' a small browser based game. The ideas are there and the coding is going fine for someone with my experience.
However.. lots of tutorials I read or answers to questions contain code like prepared statements with mysqli, a step further (if I'm getting this right?) is PDO. When I built my login and register page I used PDO, while not fully understanding mysql/prepared statements yet. I'm not sure whether I'm doing everything OK but it works, so that's a start. I want to use the latest techniques of PHP coding because the reason why I'm doing this project is because I want to improve, and stay up-to-date :-)
Another thing is OOP, using objects, classes.. This is a way of coding I have never seen before and is hard for me to grasp. I prefer using functions since it's easy to use.. Especially with the kind of project I'm working on; a browser PvP game.
So the question I have is: What do you suggest me to use, PDO and Oject Oriented Programming? If so, where can I find the best beginner help on OOP? Since this is something I have a hard time on.
Or still functions and maybe not even PDO but only prepared statements?
Thanks for the read :-)
How to code php/mysql
Page 1 of 16 Replies - 382 Views - Last Post: 11 April 2012 - 01:11 AM
Replies To: How to code php/mysql
#2
Re: How to code php/mysql
Posted 10 April 2012 - 01:54 PM
Hey, I'm glad to see someone to that interested in php!
As for starting with a php based game...I'm not sure if it is the best but, if you are really interested, I'm not the one who's going to crash your dreams...Hope you can create a interesting game, and learn with it!
For answer your question, we have a really nice TUTORIAL here in DIC, featuring Dormilich, if you continue to post here( php forum) I'm sure you'll see him!
Hope you have a good time with mysql and php! Good Luck
As for starting with a php based game...I'm not sure if it is the best but, if you are really interested, I'm not the one who's going to crash your dreams...Hope you can create a interesting game, and learn with it!
For answer your question, we have a really nice TUTORIAL here in DIC, featuring Dormilich, if you continue to post here( php forum) I'm sure you'll see him!
Hope you have a good time with mysql and php! Good Luck
#3
Re: How to code php/mysql
Posted 10 April 2012 - 02:03 PM
Hey, thanks for the fast reply!
Ah I remember that link, I've already seen Dormilich around and he linked me to it, but I was very busy back then. I'll certainly give it a read. Would you, however, recommend me to read a bit about OOP first?
Oh and just curious, what kind of project would you recommend a beginner such as I ?
Ah I remember that link, I've already seen Dormilich around and he linked me to it, but I was very busy back then. I'll certainly give it a read. Would you, however, recommend me to read a bit about OOP first?
Oh and just curious, what kind of project would you recommend a beginner such as I ?
#4
Re: How to code php/mysql
Posted 10 April 2012 - 02:19 PM
OOP and PDO are two different subjects, although PDO can use OOP (and vice versa). You'll need to learn both.
I recommend you pick small projects and focus on writing well structured, readable code. You should also force yourself to make as your least important goal: "getting it to work". Quality code is easy to make work. Crappy code that works is still a nightmare.
I recommend you pick small projects and focus on writing well structured, readable code. You should also force yourself to make as your least important goal: "getting it to work". Quality code is easy to make work. Crappy code that works is still a nightmare.
#5
Re: How to code php/mysql
Posted 10 April 2012 - 02:28 PM
Well, I really don't know what you have tried ...but a read/write on the db.
a small dynamic website with a subject that you like!
like organizing your dvds/movies, or keep track of your music by style and something like that. and after that you can create something like statistics..like:
rock--> 300songs
pop--> 32songs
or for the movies
action-->32
thriller-->12
horror-->4
Think it would be a good start, but like I said, I really don't know where you at with the language!
a small dynamic website with a subject that you like!
like organizing your dvds/movies, or keep track of your music by style and something like that. and after that you can create something like statistics..like:
rock--> 300songs
pop--> 32songs
or for the movies
action-->32
thriller-->12
horror-->4
Think it would be a good start, but like I said, I really don't know where you at with the language!
#6
Re: How to code php/mysql
Posted 10 April 2012 - 03:16 PM
This site helped me grasp most of my current knowledge of OOP in php. It's a bit of a long read, having many chapters, but it covers wide aspects of php objects, in detail.
As for prepared statements, I must have read Dormilich's PDO tutorial about 1000 times. It has pretty much all you need to get on your feet with PDO
As for prepared statements, I must have read Dormilich's PDO tutorial about 1000 times. It has pretty much all you need to get on your feet with PDO
This post has been edited by Slice: 10 April 2012 - 03:18 PM
#7
Re: How to code php/mysql
Posted 11 April 2012 - 01:11 AM
Thanks guys, think I have enough material to keep me busy for a few weeks haha!
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote






|