Why is not preferable to use mysql functions in PHP

0 votes
Can someone tell me the reasons because of which why one should not use mysql_*functions like(mysql_query(), mysql_connect() or mysql_real_escape_string())?
Sep 7, 2018 in Database by CodingByHeart77
• 3,720 points
192 views

1 answer to this question.

0 votes

The reasons are as follows:

The MySQL extension:

  • Does not come under active development
  • Is officially deprecated as of PHP 5.5 (released June 2013).
  • Has been removed entirely as of PHP 7.0 (released December 2015)
  • It lacks an OO interface
  • Also does not  support:
    • Non-blocking, asynchronous queries
    • Prepared statements or parameterized queries
    • Stored procedures
    • Multiple Statements
    • Transactions
    • The "new" password authentication method (on by default in MySQL 5.6; required in 5.7)
    • All of the functionality in MySQL 5.1

Since it is deprecated,  I would suggest not using it, as it would make your code less future proof.

answered Sep 7, 2018 by DataKing99
• 8,240 points

Related Questions In Database

0 votes
1 answer

What is the syntax of USE statement in MySQL?

The USE statement is used to mention ...READ MORE

answered Nov 27, 2018 in Database by Sahiti
• 6,380 points
204 views
0 votes
1 answer

What is the NOT Operator in MySQL?

NOT operator displays a record when the ...READ MORE

answered Dec 13, 2018 in Database by Sahiti
• 6,380 points
201 views
0 votes
1 answer

What is the rule to use group by, having and where clause?

Hi samar, this is a very common mistake ...READ MORE

answered Jul 2, 2019 in Database by anonymous
428 views
0 votes
1 answer

Why is MongoDB preferred?

MongoDB is considered to be best NoSQL ...READ MORE

answered Jul 24, 2018 in Database by shams
• 3,660 points
180 views
0 votes
2 answers
0 votes
2 answers

How to send data to my database from html and css Contact Us Form?

Hello @Sign, It is simple to create contact ...READ MORE

answered Aug 4, 2020 in Database by Niroj
• 82,760 points
5,258 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
2,554 views
0 votes
1 answer

Find values in a comma separated string in a MySQL query

You can add commas to the left and ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,380 points
9,872 views
0 votes
1 answer

Is SELECT * harmful in Database?

There are really three major reasons: Inefficiency in ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,240 points
227 views
0 votes
1 answer

What are the manipulation functions in SQL?

There are three case manipulation functions in ...READ MORE

answered Oct 11, 2018 in Database by DataKing99
• 8,240 points
2,397 views