DEV Community

Discussion on: mysql database connection in php

Collapse
 
arxeiss profile image
Pavel Kutáč

Hi, rather than mysqli, I would prefer using PDO. php.net/manual/en/pdo.connections.php

It would be much easier to migrate from MySQL to another DB if needed. It is used in all frameworks like Laravel, Symfony etc.

Collapse
 
pavankumarsadhu profile image
pavankumarsadhu

Hi there,
Yeah I agree with you, but for beginners that will be little bit confusion, as a newbie, the above approach will be much simpler.

Thanks for your response!