Home > Article > Backend Development > Is it necessary to determine the database version_PHP tutorial
Question
Is it necessary to determine the database version?
Solution
I saw it in a class. I wonder if it is necessary to make a judgment now?
Aren't there many people who still use pre-4.1 versions? if($this->version() >'4.1')
mysql_query("SET NAMES 'utf8'");
Copy code [ ]
Reference answer
It is necessary, some will use views, this is only available in 5.0 and above
Reference answer
Well, it is still necessary if you want your product to be portable. . . . .
Reference answer
Very necessary.
Reference answer
I didn’t understand enough, but now I understand, thank you!
Reference answer
I’m not sure about this, haha
Reference answer
Is anyone still using versions below 4.1? Why?
Reference answer
Backwards compatible, necessary