Should I be using mysqli or mysql when querying a database? I know you can use both and I'm unsure about which one is the best to use. I know I have to make a login system using mysqli as its more secure. Does it matter which one?
Asked
Active
Viewed 30 times
-1
-
1http://php.net/mysqlinfo.api.choosing – mario Jan 23 '15 at 07:55
-
https://www.udemy.com/blog/mysql-vs-mysqli/ – adarsh hota Jan 23 '15 at 07:56
2 Answers
0
Between the two options you have offered Definitely use mysqli
, the mysql
functions have been deprecated from php
Please refer to php documentation -
* http://php.net/manual/en/migration55.deprecated.php
Another alternative is to use PDO when connecting to a database.

Michael Coleman
- 3,288
- 3
- 19
- 18
0
mysql is deprecated. That means it will cease to work some time in the future. So you are strongly encouraged to use mysqli or pdo. I Suggest reading up on that matter on php.net.

Burki
- 1,188
- 19
- 28