Fmdpa Posted July 25, 2010 Share Posted July 25, 2010 In a book I am reading to learn PHP and MySQL, the author uses PEAR DB for his examples. However, I installed phpmyadmin. Does it have the same purpose as phpmyadmin? Is the syntax for connecting to a database different with phpmyadmin installed? The code given for connecting to a DB with PEAR was this: DB::connect('db_program://user:password@hostname/database'); Link to comment Share on other sites More sharing options...
justsomeguy Posted July 25, 2010 Share Posted July 25, 2010 phpMyAdmin is just an application written in PHP to manage a MySQL server, it doesn't have any effect on anything else PHP does. Link to comment Share on other sites More sharing options...
Fmdpa Posted July 25, 2010 Author Share Posted July 25, 2010 So this connection code should work regardless of whether phpmyadmin is installed? What is PEAR DB, then? Link to comment Share on other sites More sharing options...
justsomeguy Posted July 25, 2010 Share Posted July 25, 2010 Pear DB is a database abstraction class that someone wrote for PHP to automate a lot of the tasks of having PHP work with databases. It also makes it so that you can have your application use Pear DB, and if you move the application to a different server or get a different database you can just have the DB class use the other database and don't need to rewrite the application. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.