EvilZone
Programming and Scripting => Beginner's Corner => Topic started by: Code.Illusionist on June 04, 2015, 08:59:43 PM
-
Greetings Evilzone member,
I would like to ask you some , most likely - milion times asked questions, but yet, I trust you more than google results for it. So , here we go (Joker):
1. What basic knowledge should one PHP programmer have for working with databases?
2. What basic knowledge should one PHP programmer have for working with AJAX and Javascript in general?
Thanks for replies in advance.
-
1. Basic knowledge of PHP and SQL
2. Basic knowledge of PHP and Javascript
Maybe I don't understand your question but the answers seem pretty fucking obvious?
This.. this one time. I agree with you.
-
Alright, let me get questions asked a bit more specific. IS there anything I must know more than anything else, something that is so essential to work with? Is my question a bit better now?
-
Not really. You might want to use PDO for your database shit though.
-
PDO is best way for that? So far I used mysqli functions and erverything was fine, at least for me. Is PDO that good?
-
Haven't use PDO myself. But afaik when with mysqli(-driver) you can communicate only with mysql databases, but with right PDO-driver you can use mysql, microsoft sql, postgresql, sqlite, etc. databases. So i think pdo's flexibility is one of it advantages. Correct me if i'm wrong.
-
Haven't use PDO myself. But afaik when with mysqli(-driver) you can communicate only with mysql databases, but with right PDO-driver you can use mysql, microsoft sql, postgresql, sqlite, etc. databases. So i think pdo's flexibility is one of it advantages. Correct me if i'm wrong.
Ah , yes, you are right. I read it somewhere before. Well, what has to be done, will be done. :D
-
PHP, MySQL, AJAX, JavaScript, JQuery, HTML5, CSS3, ASP
Master those and you will have web design in your pocket for front end web development. Back end web development you'll want c++
-
Haven't use PDO myself. But afaik when with mysqli(-driver) you can communicate only with mysql databases, but with right PDO-driver you can use mysql, microsoft sql, postgresql, sqlite, etc. databases. So i think pdo's flexibility is one of it advantages. Correct me if i'm wrong.
This is correct; the mysqli_* functions were kinda a fix for the mysql_* ones. The mysqli_* set allows you to easily update the mysql_* functions and maintain a functional programming style (vs OOP). PDO's, to my knowledge, must be an object, whereas mysqli provides a functional AND OOP interface.
That being said, PDO is the standard, particularly among open-source projects. This is largely to allow the interchangeability between databases, as mentioned, as well as the OOP style. Either is preferred over mysql_*, but they're approximately equivalent for all intents and purposes.
-
Alright, thanks everyone for replies. I find it useful.
-
PDO also provides better security, error handling and better support for prepared statements, which virtually eliminates the possibility of SQLi, if used correctly.