+ 6
What is the best and latest way to make connection to your database in PHP?
I am learning PHP and I have seen different ways of making connection to your MySQL database. Which method is the best and acceptable on php 7?
12 Respostas
+ 1
You can use mysqli or pdo, but you have to know mysqli only works for mysql databases, however pdo works on 12 different database systems. Both are object oriented, but mysqli also offers a procedural option. And both support prepared statements to avoid sql injections. However i personally prefer pdo.
+ 3
Mysql is still useful, but I've heard and read articles saying PDO is faster and safer.
even thinking of starting writing game all over again using php 7 and PDO. Was using before php 5.2+ & mysql.
+ 3
both mysqli and pdo...but, mysqli's syntax is easier!
+ 2
PDO is a good method
or a ORM like Doctrine
+ 2
mysql is deprecated now use mysqli or pdo (preferred).
+ 1
up
+ 1
PDO is considered the latest and the greatest. If you want to use MySQL, be my guest but PDO is better.
0
as far as I think.. MySQL is still a good choice
0
both MySQLi and pdo
but pdo can connect 12 languages at a time.
0
10 language connect QCP driver with draw ling segment error mine... but nice performance..
0
my sql
0
hey help me too with this https://www.sololearn.com/Discuss/405725/?ref=app