Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could I follow a MySQLi tutorial using MySQL?

Tags:

php

mysql

mysqli

There is a tutorial I'd like to follow which has some great reviews. The only problem being it makes use of MySQLi instead of MySQL. I only have access to MySQL.

Are there big enough differences to warrant looking for a straight PHP-MySQL tutorial or is it worth just going with this one and making changes myself?

I would say I am a 'beginner' with both PHP and MySQL, but can find my way around the code fine, apply CRUD etc so not completely new.

like image 413
joe Avatar asked Aug 10 '26 13:08

joe


1 Answers

MySQLi is PHP's "improved" MySQL driver. Meaning it will take full advantage of MySQL servers version higher than 4.1.3.

Then underlaying MySQL server would be the same, using the old MySQL interface or the newer MySQLi, so everthing should remain valid if you are following a MySQL tutorial on a MySQLi interface.

In your case, you should pay attention to MySQLi only stuff since they won't be avaliable to you.

Quote from the official website:

What is PHP's mysqli Extension?

The mysqli extension, or as it is sometimes known, the MySQL improved extension, was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. The mysqli extension is included with PHP versions 5 and later.

The mysqli extension has a number of benefits, the key enhancements over the mysql extension being:

Object-oriented interface

Support for Prepared Statements

Support for Multiple Statements

Support for Transactions

Enhanced debugging capabilities

Embedded server support

like image 125
Vinicius Kamakura Avatar answered Aug 13 '26 04:08

Vinicius Kamakura