Recommend this page to a friend! |
Download .zip |
Info | View files (4) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2005-10-16 (11 years ago) | 68% | Total: 3,016 | All time: 1,165 This week: 961 |
Version | License | Categories | ||||
mysqlconnect 1.0 | Free for non-comm... | PHP 5, Databases |
Description | Author | |||||||||||||
This class is a MySQL database access wrapper that uses some PHP 5 features to simplify the usual operations. |
|
/********************************************************************/ Author: Herve Tribouilloy Date: 15 october 2005 Purpose: connection layer to MySQL with PHP5.0, using stdClass for basic container of data. Use of try/catch block allowing handy way to display error. /********************************************************************/ /********************************************************************/ Functionality: The class focus on the readability of the SQL /********************************************************************/ This class aims to make easy the exchange of data with MySQL using php. - The update, insert and delete are handled by a function (setQuery) - The select query returns an array of stdClass objects (getResult, getRecord) I tested the class on a full project. In this project, the connection is only one layer. Validation of the data and their parsing is handled by other classes. I suppose everybody has his own way to validate and display the error. How to use it: 1: setup the database - open a MySQL console, open the text file db.sav - the first line create a database test1 - the other line create a table named test_table 2: use the example - load the page example.php and the class connection.php into a class folder. The script example.php shows many ways of the use of the class. /********************************************************************/ |
Files |
File | Role | Description |
---|---|---|
connection.php | Class | class code |
db.sav | Data | database source |
example.php | Example | example to use connection.php file |
Readme.txt | Doc. | readme |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Ratings | User Comments (1) | ||||||||||||||||||||||||||||||||||
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.