How to create database connection and query in PHP? Q & A › Category: PHP › How to create database connection and query in PHP? 0 Vote Up Vote Down Admin Staff asked 4 years ago How to create database connection and query in PHP? Share this:TwitterFacebookWhatsAppPinterestLike this:Like Loading... 1 Answers 0 Vote Up Vote Down Admin Staff answered 4 years ago ince PHP 4.3, mysql_reate_db() is deprecated. Now you can use the following 2 alternatives. mysqli_query() PDO::_query() Share this:TwitterFacebookWhatsAppPinterestLike this:Like Loading...