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,680 points
24 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,100 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 darklord
• 6,140 points
52 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 darklord
• 6,140 points
49 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,580 points
21 views
0 votes
1 answer

What is checkpoint in Database?

Checkpoint declares a point before which all ...READ MORE

answered Sep 4, 2018 in Database by darklord
• 6,140 points
53 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 darklord
• 6,140 points
561 views
0 votes
1 answer

How to do a batch insert in MySQL

You can try out the following query: INSERT ...READ MORE

answered Sep 10, 2018 in Database by darklord
• 6,140 points
73 views
0 votes
1 answer
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,100 points
19 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,100 points
237 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.