Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Mysql or mysqli ?
- Pjotr Wedersteers
August 11, 2004, 8:20 pm
rate this thread
support when using MySQL 4.1 or higher
Can anyone tell me in layman's terms why and when I want to use this instead
of 'plain' mysql ?
What features do I get extra ? I have MySQl 4.0.20, according to MySQL site
the latest stable/production release.
Is MySQL 4.1 recommendable ? Should I be implementing everything with MySQLi
from now on anyway ?
Thanks in advance for your opinions & explanations!
Re: Mysql or mysqli ?
have discovered one important fact - to access MySQL 4.1.3 or higher you
must use the 'mysqli_' functions as the ordinary 'mysql_' functions do not
work. If you try you will get the following message:
Warning: mysql_connect(): Client does not support authentication protocol
requested by server; consider upgrading MySQL client in
F:\Apache2\HTDOCS\testmysql.php on line 28 Could not connect to MySQL
It is also not possible to access a pre-4.1.3 database with the new
'mysqli_' functions. So when you upgrade to version 4.1.3 of MySQL you must
also upgrade your PHP code. For a lot of people this could be a major
problem but for me it is a simple matter - my code can auto-detect which
MySQL extension is installed then include() the relevant class file at
runtime. I have one class file for the 'mysql_' extension and another for
the 'mysqli_' extension.
This is one big advantage of the 3 tier architecture with its separate data
- David R├Âthlisberger
August 12, 2004, 4:52 am