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,750 points
1,268 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,250 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,370 points
773 views
0 votes
1 answer

What is the NOT Operator in MySQL?

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

answered Dec 14, 2018 in Database by Sahiti
• 6,370 points
990 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
1,309 views
0 votes
1 answer

Should I use != or <> for not equal in T-SQL?

Most of the existing databases support != Databases that ...READ MORE

answered Feb 14, 2022 in Database by Vaani
• 7,070 points
431 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,840 points
36,006 views
0 votes
0 answers

How to run a PHP function due to a button click (with button 'data' passed)?

I manage some sortiment items on a ...READ MORE

May 28, 2022 in PHP by Kichu
• 19,040 points
3,964 views
0 votes
0 answers

Show values from a MySQL database table inside a HTML table on a webpage

I am working on retrieving the values ...READ MORE

May 29, 2022 in PHP by Kichu
• 19,040 points
820 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,250 points
867 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,250 points
5,471 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP