-6

I'm using MYSQL Workbench right now to build my database, do I need to build my database differently now to use MYSQLI or is MYSQLI just the syntax for connecting to the database. Also do I need to download the MYSQLI driver and disable the MYSQL one... I'm honestly just very confused. I'm going to learn PDO to connect to my database, I just don't want something bad to happen to my website after, from what I understand, the MYSQL driver wont work in the future and everything must use the MYSQLI driver, or library, or whatever it is. I don't quite understand what this switch to MYSQLI is. Should I use something else?

Sorry if what I post is confusing, I'm just a beginner.

Thanks a lot,

Mike

  • 2
    Nothing will change, your code will work just fine, and MySQL workbench is a tool, which is not related to your PHP code. – Kreshnik Hasanaj Oct 09 '15 at 20:43
  • 2
    Start learning the basics of PHP and start using a good framework like `Laravel` – Kreshnik Hasanaj Oct 09 '15 at 20:44
  • are you saying that I don't need to learn MySQLI and never will... because I thought we needed to change now that MySQL was depricated. And thank you for your help, I will look at leravel right now – Michael Schroeder Oct 09 '15 at 20:53

1 Answers1

3

I'm using MYSQL Workbench right now to build my database, do I need to build my database differently now to use MYSQLI or is MYSQLI just the syntax for connecting to the database.

No. You do not need to build your database again. MYSQLI is a set of functions to establish a relation with any mysql database. You can query, delete, create, etc... http://php.net/manual/pt_BR/book.mysqli.php

Also do I need to download the MYSQLI driver and disable the MYSQL one...

You do not need to download MYSQLI driver, but, YES, you need to activate MYSQLI driver on your php.ini

I'm going to learn PDO to connect to my database, I just don't want something bad to happen to my website after, from what I understand, the MYSQL driver wont work in the future and everything must use the MYSQLI driver, or library, or whatever it is.

PDO is a great lib and it's good for you to learn how to use it. But MYSQLI and PDO do the same thing in different ways (instead of connecting to other databases like SQL SERVER) so you need to choose if you want to use PDO or MYSLI on your core application.

I don't quite understand what's this switch to MYSQLI is. Should I use something else?

It all depends on what kind of application you're creating. Also you should learn all possible technologies related once it's good for your career. But in any case there are several frameworks that will do the thing for you and connect to the db and also create the queries.

Ex

http://cakephp.org/

http://www.codeigniter.com/

http://www.yiiframework.com/

Barmar
  • 741,623
  • 53
  • 500
  • 612
Guilherme Ferreira
  • 2,209
  • 21
  • 23