<?php
// Connect to the database
$database = new DB ( $config [ 'dbHost' ], $config [ 'dbUser' ], $config [ 'dbPass' ], $config [ 'dbDatabase' ]);
$sql = "SELECT * FROM t1" ;
if( $res = $database -> Query ( $sql )) {
// The query was a success write out the results
while( $row = $database -> FetchObject ()) {
// We dont need to supplie the $result argument to the FetchObject method, it automaticaly uses the last used query.
echo( $fow -> field . "<br />" );
}
}
else {
// The query faild, report errors
$database -> PrintErrors ();
}
?>
Specify your connection settings and create a link to a MySQL database. Categories : PHP , PHP Classes , Databases , MySQL , Beginner Guides Setting up InnoDB on MySQL and using Transactions Begin, Commit, Rollback in PHP. Categories : PHP Classes , Databases , PHP , MySQL , InnoDB PHP Object Example of the Perl DBI with MySQL Categories : PHP , PHP Classes , MySQL , Databases , Perl Link Manager for Link Exchangers Categories : PHP , PHP Classes , Databases , MySQL , CURL A script to generate a report from a valid mysql connection. The user has to supply which fields he wants to display in table. All properties are changable.
Categories : PHP , PHP Classes , Databases , MySQL , HTML and PHP Simple database class Categories : PHP , PHP Classes , MySQL , Databases Ajax PHP Tree (Left and Right) with MySQL Categories : PHP , Databases , MySQL , AJAX , PHP Classes YellowPages Content Grabber (PHP5 +) Categories : PHP , PHP Classes , Regexps , Databases , MySQL Convert SQL from oracle,mysql,mssql,sqlite and odbc to SQL compatible Categories : PHP , PHP Classes , Databases , MySQL , MS SQL Server MySQL Connection/Query Class Categories : Databases , MySQL , PHP , PHP Classes MySQL Handler Categories : PHP , Databases , MySQL , Classes and Objects , PHP Classes MySQL Class to ease Database connectivity Categories : MySQL , PHP Classes , Databases , PHP PHP Transfer data from text file to Mysql Table Categories : PHP , PHP Classes , Filesystem , Databases , MySQL Simple Mini Poll class library (SimPoll) Categories : PHP , PHP Classes , Databases , MySQL , Complete Programs Sort the results from a SELECT query (any number of columns) into an array automatically. Categories : PHP , PHP Classes , Arrays , Databases , MySQL