PHP Classes
elePHPant
Icontem

DB Connect: Query a database and fetch the result and metadata

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2005-02-09 (11 years ago) RSS 2.0 feedStarStar 37%Total: 2,084 This week: 1All time: 1,823 This week: 1,047Up
Version License Categories
db_connect 1.0Public DomainDatabases
Description Author

This is a simple class that can connect to a MySQL database, execute an SQL query and retrieve the result set rows and the respective metadata.

The class get function executes an SQL query and returns status of success of the executed query, the number of rows, the number of columns, the total number or result cells, and the list of names of the result columns as part of the result set array. The metadata result fields are prefixed with & to avoid confusion with the result column names.

Depending on the number of rows and columns contained in the result set, it may contain a two dimension array with all the data of the result columns and rows, or just an array with the data of one column or one row, or just one result value.

Picture of Cristian Rusu
Name: Cristian Rusu <contact>
Classes: 2 packages by
Country: Romania Romania

  Files folder image Files  
File Role Description
Accessible without login Plain text file conn_data.inc.php Conf. Used to specify the mySQL connection data
Plain text file db_conn.php Class Class file
Accessible without login Plain text file usage.php Example usage sample

 Version Control Unique User Downloads Download Rankings  
 0%
Total:2,084
This week:1
All time:1,823
This week:1,047Up
 User Ratings  
 
 All time
Utility:50%StarStarStar
Consistency:62%StarStarStarStar
Documentation:-
Examples:62%StarStarStarStar
Tests:-
Videos:-
Overall:37%StarStar
Rank:2757