Quantcast
Channel: Why shouldn't I use mysql_* functions in PHP? - Stack Overflow
Browsing latest articles
Browse All 15 View Live

Answer by Pratik Chheda for Why shouldn't I use mysql_* functions in PHP?

There isn't any need to update if you are sure you don't want to upgrade the PHP version. But at the same time, you won't get security updates either which will make your website more vulnerable to...

View Article



Answer by Muhammad Ali for Why shouldn't I use mysql_* functions in PHP?

Don't use mysql, because it is deprecated. Use Mysqli instead.What Deprecated Means:It means don't use some specific function/method/software feature/particular software practice. It just means that it...

View Article

Answer by Pavel Tzonkov for Why shouldn't I use mysql_* functions in PHP?

It's possible to define almost all mysql_* functions using mysqli or PDO. Just include them on top of your old PHP application, and it will work on PHP7. My solution here.<?phpdefine('MYSQL_LINK',...

View Article

Answer by Ani Menon for Why shouldn't I use mysql_* functions in PHP?

I find the above answers really lengthy, so to summarize:The mysqli extension has a number ofbenefits, the key enhancements overthe mysql extension being:Object-oriented interfaceSupport for Prepared...

View Article

Answer by Alexander for Why shouldn't I use mysql_* functions in PHP?

The MySQL extension is the oldest of the three and was the original way that developers used to communicate with MySQL. This extension is now being deprecated in favor of the other twoalternatives...

View Article


Image may be NSFW.
Clik here to view.

Answer by mario for Why shouldn't I use mysql_* functions in PHP?

Ease of useThe analytic and synthetic reasons were already mentioned. For newcomers there's a more significant incentive to stop using the dated mysql_ functions. Contemporary database APIs are just...

View Article

Answer by Fluffeh for Why shouldn't I use mysql_* functions in PHP?

This answer is written to show just how trivial it is to bypass poorly written PHP user-validation code, how (and using what) these attacks work and how to replace the old MySQL functions with a secure...

View Article

Answer by Your Common Sense for Why shouldn't I use mysql_* functions in PHP?

Speaking of technical reasons, there are only a few, extremely specific and rarely used. Most likely you will never ever use them in your life.Maybe I am too ignorant, but I never had an opportunity to...

View Article


Image may be NSFW.
Clik here to view.

Answer by NullPoiиteя for Why shouldn't I use mysql_* functions in PHP?

PHP offers three different APIs to connect to MySQL. These are the mysql(removed as of PHP 7), mysqli, and PDO extensions.The mysql_* functions used to be very popular, but their use is not encouraged...

View Article


Answer by Madara's Ghost for Why shouldn't I use mysql_* functions in PHP?

First, let's begin with the standard comment we give everyone: Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about...

View Article

Answer by enhzflep for Why shouldn't I use mysql_* functions in PHP?

Because (amongst other reasons) it's much harder to ensure the input data is sanitized. If you use parametrized queries, as one does with PDO or mysqli you can entirely avoid the risk.As an example,...

View Article

Answer by Quentin for Why shouldn't I use mysql_* functions in PHP?

The MySQL extension:Is not under active developmentIs officially deprecated as of PHP 5.5 (released June 2013).Has been removed entirely as of PHP 7.0 (released December 2015)This means that as of 31...

View Article

Answer by Trott for Why shouldn't I use mysql_* functions in PHP?

There are many reasons, but perhaps the most important one is that those functions encourage insecure programming practices because they do not support prepared statements. Prepared statements help...

View Article


Answer by Alnitak for Why shouldn't I use mysql_* functions in PHP?

The mysql_ functions:are out of date - they're not maintained any moredon't allow you to move easily to another database backenddon't support prepared statements, henceencourage programmers to use...

View Article

Why shouldn't I use mysql_* functions in PHP?

What are the technical reasons for why one shouldn't use mysql_* functions? (e.g. mysql_query(), mysql_connect() or mysql_real_escape_string())?Why should I use something else even if they work on my...

View Article

Browsing latest articles
Browse All 15 View Live


Latest Images