PDO Connections to MySQL from PHP

preview_player
Показать описание
When you are using a MySQL database with your PHP, you need to create a connection between the PHP and the MySQL programs.

A PDO connection is the best way to do this.

This tutorial covers how to create a database and user through PHPMyAdmin and then to connect to the database from a PHP page.

connection page Code GIST:
Рекомендации по теме
Комментарии
Автор

insanely soothing voice - much fun to listen too and also: great explanation

randommonkey
Автор

Ich habe mittlerweile den Fehler behoben... Habe keine Ahnung wie, ein mal docker build nocache und ein paar Anpassungen im Code... Das muss man nicht verstehen

pitekamonu
Автор

What about persistent connections ? What if I have multiple files do I need to create a new connection with each script ?

aoba-rhsb
Автор

Thank you. I really appreciate your clear concise explanations and the variety of topics. Just one question. Do you need a minimal version of PHP in order to use PDO?

westfield
Автор

I didn't know you did PHP as well--I've been refocusing here, good news

webstuff
Автор

when would one use mysqli or any other connection method? and why would one be preferred over the other?

webstuff
Автор

sir i need some help because i have tried many time but it said "couldn't find the server"

banglaanimereviewssl
Автор

what would the DNS be if the file here was on a external webserver: $db = new PDO('mysql: host=what????; is it the domain name of the website associated with this?

webstuff