What does MySQLi vs PDO Teach You about Development?

Поделиться
HTML-код
  • Опубликовано: 9 июн 2021
  • 🔥 PREMIUM DEVELOPER MENTORING PROGRAM:
    studioweb.com/mentoring/
    🔥 CODER'S CAREER PATHS WEBINAR - FREE 29 MINUTE VIDEO:
    newsletters.stefanmischook.co...
    🔥 LIZARD WIZARD KOMODO - TRANSFORMATIONAL MIND TRAINING:
    newsletters.stefanmischook.co...
    🔥 THEBODYDEVELOPER - Get in shape and lose weight ... WITHOUT exercise!
    www.thebodydeveloper.com/
    *************
    Channel Discord Server: / discord
    WEB HOST PAYS FOR YOUR WEB DESIGN TRAINING IN 2021:
    www.killersites.com/blog/2020...
    POPULAR & EASY CODING COURSES:
    Full stack web developer course: school.studioweb.com/store/co...
    Python 3 Foundations & Certification: school.studioweb.com/store/co...
    Complete Freelancer: school.studioweb.com/store/co...
    Complete Entrepreneur: school.studioweb.com/store/co...
    *************
    🦎 Lizard Wizard Course:
    school.studioweb.com/store/co...
    📚 BOOKS TO READ:
    My Beginners HTML5, CSS3: amzn.to/2wKsVTh
    … Complements Studioweb courses on HTML5, CSS3 and JavaScript.
    Refactoring: Improving the Design of Existing Code (2nd Edition) amzn.to/3o5cTbw
    HeadFirst Design Patterns: amzn.to/2LQ0Gdh
    Java Refactoring: Improving the Design of Existing Code (1st Edition) amzn.to/3a9nSsZ
    The Naked Ape:
    amzn.to/3fhS1Lj
    ✉️ STAY IN CONTACT:
    Stef's social links:
    Instagram: stefanmisch...
    Twitter: / killersites
    Stef's business channel:
    / @unclestef8239
    👉 GOOGLE REVIEW:
    g.page/studioWebedu/review?mt
    Leave a Google review about Stef.
    READ MY GOOGLE REVIEWS:
    bit.ly/2MUii8x
    MY MOUSE & KEYBOARD:
    Logitech Keyboard I use: amzn.to/38jYDqE
    Logitech mouse I use: amzn.to/2IeVvBj
    SUPPLEMENTS THAT WORK AMAZING FOR ME:
    Protein Essentials Beef Gelatine Powder:
    amzn.to/2Pf52vL
    ... Healed my very bad knee. If you have joint problems, this *could do miracles for you.
    Webber Naturals 88862 Glucosamine Chondroitin
    amzn.to/3ss9WEa
    MY CAMERA GEAR:
    Godox VL150 lights: amzn.to/3lhsYZP
    Sigma 18-35 lens: amzn.to/33sRh0T
    Canon C300 Mark 3 Cinema Camera
    Thanks!
    Stef
    #php #pdo #mysqli

Комментарии • 32

  • @raymondRodriguez
    @raymondRodriguez 2 года назад +2

    Great video, thanks for emailing me on this.

  • @salzee
    @salzee 2 года назад +3

    Thanks Stefan, great video comparing PDO vs MySQLi. I've only ever used MySQLi as it does everything I need. I have no intention of moving to another DBMS.

  • @TazExprez
    @TazExprez 2 года назад

    Thanks a lot for this!

  • @neptronix
    @neptronix 2 года назад +5

    I have never found a reason to justfy PDO's additional complexity and syntax, and i always want fast code writing and easy debugging. Therefore i still use mysqli.
    In 12 years of software development, i've never had a reason to use something other than mysql.
    Maybe if you have other needs, then PDO makes sense.

  • @rotmgWevouls
    @rotmgWevouls 2 года назад

    I love you Stefan Mishook ❤

  • @jackt6112
    @jackt6112 2 года назад

    DB switching happens regularly unless your sole reference is the web. I've written two large ERP packages for two different tier-1 automotive suppliers and have switched databases for performance or cost reasons. I do database consulting and convinced a large TV network to switch. All large ERP programs gives customers the ability to select their back end and platform. The differences are handled by native drivers, database middleware, code added to the database or any combination but the program code doesn't change at all.

  • @mr_don_key
    @mr_don_key 2 года назад +2

    db switching happends regularly during conceptial stages. And even lateron , when the site grows rapidly (and is likely in need of multiple db types etc.. )
    PDO is the most flexible one in the end. MySQLi is only good for mysql/mariadb use. (hence the name)

  • @drewwesley9506
    @drewwesley9506 2 года назад +1

    I think another advantage of PDO is the universal syntax when comparing two different database platforms in a 'lab' setting. For example, I wanted to compare DataTables using both PDO (for MySQL) and PDO_ODBC (for FileMaker Pro). Rare example, but better to go with one-size-fits-all I think.

  • @SteveSmith-jc7pc
    @SteveSmith-jc7pc 2 года назад +2

    Never change Database?
    Ha ha, I did.
    Strangely I went from Postgres to mySQL. Turned out with the queries I needed to run Postgres was too slow under load testing and mySQL was about twice as fast.
    Obviously, I had build the original application using PDOs.
    The switch was relatively easy. Just a few changes to deal with mySQL's lack of proper boolean types.
    Anyway, good video from Stefan as always.

    • @JediJide2
      @JediJide2 2 года назад

      Same here, had to change database from MSSQL to mySQL due to licensing issues from an application I took over, luckily for me, the database interface were all written in PDO, it was a seamless change.

  • @gaminggenes320
    @gaminggenes320 11 месяцев назад +1

    Well, MySQL is a lightweight RDBMS and have some limitations in handling transactions. As an organization grows and when MySQL can no longer handle the needs in terms of scalability, then they may have to change to MS SQL Server or Oracle. But my advice is, if you're already on MySQLi and there is no sign whatsoever that your organization is going to switch database, just stick to MySQLi. For my case, my client is using PEAR DB (deprecated and not exist in Xampp anymore) to connect their MySQL database. So for this situation, might as well you choose PDO over MySQLi in replacing PEAR DB to avoid any potential change again in the future -- Make sense?

  • @TheCorelDrawMafia
    @TheCorelDrawMafia 2 года назад +2

    Nice Video. I Love PHP. I have a question.
    I built my PHP application with PHP OOP and PDO. I set my hosting account to PHP 5.6 because of another project that is PHP 5.6 hosted on the same account. What's the implication for my new project which is PHP 7 but still works even though I set the hosting to 5.6. is there any lapse?

    • @StefanMischook
      @StefanMischook  2 года назад +1

      Speed. PHP7 is significantly more efficient than 5.6. Depending, PHP7 is up to 50% faster. It might well worth the slight upgrade hassles. I would test you app on a PHP7 or PHP8 install and see what happens.

    • @TheCorelDrawMafia
      @TheCorelDrawMafia 2 года назад

      @@StefanMischook Thanks so Much Sir, you are really the best. I have another question please. Am sorry if it's not convenient.
      What is the difference using blob Vs Longblob Vs varchar in Storing images to SQL database. Really confused. At the moment I use LongBlob

    • @StefanMischook
      @StefanMischook  2 года назад +3

      Don’t use a DBMS to store images. Store images and other blob data in the file system and references the URL in the database.

  • @theodoretoke
    @theodoretoke Год назад

    wise

  • @James-li8cm
    @James-li8cm 2 года назад

    node (in some cases) is a better choice than php, surely you jest... (didn't the maker of node state that node is not sustainable?)

    • @StefanMischook
      @StefanMischook  2 года назад +1

      I was being nice.

    • @James-li8cm
      @James-li8cm 2 года назад +1

      @@StefanMischook I suppose the time when this could be relevant is when you already have invested huge amounts of resources and code work implementing node... you have to stick with it...

  • @tambaserchamling6375
    @tambaserchamling6375 2 года назад

    Hello sir, which pro language I have to learn first

    • @StaubAig
      @StaubAig 2 года назад +2

      Any SQL variant, Javascript (and Typescript), HTML + CSS, PHP for money if you can find a job for it, at least one backend language other than JS (avoid JS backend if you can help it at all), everything else you learn based on job/interest. Good thing is, once you learn one language, the rest come easy. Most stuff is the same across all languages.

    • @hunterbrooks826
      @hunterbrooks826 2 года назад

      It really doesn't matter. Of you don't know html5 and css3, those might be a good foundations. Other than that am object oriented language like JavaScript or Python are popular. After that any back end PHP, Node, Ruby will give you a competitive arsenal of languages. You can always pivot to whatever the job requires. Node for back end can be a game to maintain though as it is just a runtime to enable JavaScript for back end.

    • @James-li8cm
      @James-li8cm 2 года назад

      @@StaubAig I remember when you needed to learn .Net for the money because PHP didn't pay very well... my how things have changed...

    • @bas3q
      @bas3q 2 года назад +1

      Learn Python first, it's incredibly easy to learn. As Stef points out in his Python course, you will learn basic concepts that apply to most other languages, and will make learning those others easier. After that, I would suggest doing HTML, then CSS, then JavaScript, then PHP, then a database like MySQL (in that order). Once you have learned those, you will be set to start building web apps.
      From there, it depends on what you want to do. If you're cool with doing WordPress, start learning about that ecosystem both using the builder tools/themes and editing themes under the hood with PHP and the other languages. If you want to do something more complex, look at Java or C++. If you want to start building web apps, look into frontend JS frameworks like React and Vue and backend tech like Node/Express (JS) and Laravel (PHP). If you're going to be working on the frontend, look into Typescript, a superset of Javascript. If you're more interested in the backend, make sure you learn how to use the command line in linux, and also server tech like Apache or NGINX.
      Whatever you do though, stay the hell away from Ruby.... /s

  • @TheMosmith22
    @TheMosmith22 2 года назад

    Nim is perfect..lol

  • @vex6559
    @vex6559 2 года назад +2

    That branding is important. PDO? Epstein fund it?

  • @codingbrother7237
    @codingbrother7237 2 года назад

    Man I am a beginner and I just want to ask, why learn html, css, javasctipt and other stuff to make awebsite if there is already a website builder? What is the pros and cons of a website that is built from html, css and js?

    • @rodrigo176
      @rodrigo176 2 года назад +2

      So I have a answer, web applications are different then websites. Yes, their are websites builders for the generic website. But those website builders wouldn't be able to make web applications such as Google docs etc. That is just my opinion.

    • @GuRuGeorge03
      @GuRuGeorge03 2 года назад +1

      if u want to build complex, custom functionality, then u need to program it urself. For example u won't find a website builder that can build u a website where u can play a game that u have designed urself. There also isn't a builder where u can feed ur user's data into some machine learning algorithm. There is just infinite applications that builders can't generalize for.

    • @SXsoft99
      @SXsoft99 2 года назад

      There are generic web applications like: shops, blogs,time trackers that don't change from project to project meaning business logic is not different, and then there are administration panels for specific companies that have certain human procedures you need to write custom code for, special reports that retrieve data in specific ways and so on

  • @wieslawhus2069
    @wieslawhus2069 Год назад

    Could not connect to the database mysql :SQLSTATE[HY000] [1045] Access denied for user 'boss2'@'localhost' (using password: YES). I did:
    CREATE USER 'boss2'@'localhost' IDENTIFIED WITH mysql_native_password BY 'AbcDef';
    GRANT ALL PRIVILEGES ON . TO 'boss2'@'localhost' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    Ubuntu 22.04. PHP 8.0. MySql 8. Connection to MySql does not work. Please help me.