|
Contributed by Joe
|
|
Saturday, 08 July 2006 |
PHP and Mysql overviewPHP has built-in database functions. one of them is the PEAR database functions.PEAR is a framework and distribution system for reusable PHP components which provide the ability to use the same functions to access any supported database.
Process of using PHP and mysql The basic steps of performing a query, whether using the mysql command-line tool or PHP, are the same: Connect to the database. Select the database to use. Build a SELECT statement. Perform the query. Display the results. Querying the Database with PHP Functions How to connect to a MySQL database with PHP. It's quite simple,when you try connecting to a MySQL database, the MySQL server authenticates you based on your username and password. PHP handles connecting to the database for you and allows you to immediately start performing queries and gathering data. Create a PHP file which Including Database Login Details PHP file format <?php $db_host='hostname of database server'; $db_database='database name'; $db_username='username'; $db_password='password'; ?>
|
|
Last Updated ( Saturday, 08 July 2006 )
|