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
134 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,210 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,320 points
156 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,320 points
127 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
268 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,630 points
115 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 in Database by Niroj
• 67,020 points
343 views
0 votes
2 answers
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,320 points
7,686 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,210 points
143 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,210 points
1,609 views