Recommend this page to a friend! |
Download .zip |
Info | View files (5) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2007-12-30 (8 years ago) | Not enough user ratings | Total: 316 | All time: 6,870 This week: 956 |
Version | License | PHP version | Categories | |||
mysqlwrapper 1.0 | Freeware | 5.0 | PHP 5, Databases |
Description | Author | ||||||||||||||
This package is a MySQL database access wrapper that can be used to execute SQL queries programmatically. |
|
README I am having more than 6 years of experience in coding and project management. I started my career with PHP and presently I am in Java, J2EE. I have a good proficiency in Web-Services, Struts, Database, PHP, Linux. You can contact me on singhgurdeep@gmail.com for any type of help. I always support OOPs based programming. This helps us to make our code robust and understandable. I also practice Design patterns in my programming. I am contributing PHP classes to this site. PHPClasses.org class helped me a lot when I was fresher, so I thanks to PHPClasses and I am contributing to this site. MySQLWrapper: We perform Database operation on almost every application. So in order to perform this operation, we have to open-->maintain-->use-->close database connection every time. Sometimes we also need to know the time taken for query to execute. In this class (MySQLWrapper) I tried to add a wrapper on MySQL database. This will save our time from writing all the MySQL stuff over and again in the application, this will save our time, resources and will make ceteralized dabase section. I have also used the PHPLogger (one of my earlier contributions) to log queries and time taken by the queries. I have added following Files in this package: 1. DatabaseInformation.php - This class included all the information required to connect to the database. 2. DatabaseManager.php - This is the low level class. It checks for the connection and returns the connection if unavailable. - This class defines executeQuery and executeUpdate methods, which actuall executes the query. - This class use PHPLogger class to log the message. - this class can create database - This class have the method define to check if table or column in table exists. - This class have the method to select database. - This class have the method to close connection 3. QueryManager.php - This class uses methods from DatabaseManager class and do the following: - This class returns the count rows from the table. - This class executes query provided. - This class executes the query based on the condition. - This class update the table data. - This class delete/truncate the table data. - This class creates the table. 4. queryManagerTest.php - This php file tells us the way to use the methods defined in QueryManager.php 5. userLogin.php - This is the simple Login screen. It picks the username/password entered by the user. - Passes the username/password to UserManager class - UserManager class then uses QueryManager class to execute the required queries. As such you can know the class execution way with simple queryManagerTest.php file. But still if you want to use my Login application to test it, then please change the path as per your requirement. or you can keep database related files (DatabaseInformation.php, DatabaseManager.php and QueryManager.php) files in package called MySQLWrapper. User related file (UserManager.php) in package called UserAction. and please keep userLogin.php and general.css outside these packages or as per your requirements. Please also include Logger package from PHPLogger to log the application messages. Though I do not commit anything but please suggest any improvements on singhgurdeep@gmail.com |
Files |
File | Role | Description |
---|---|---|
DatabaseInformation.php | Class | Contains the basic information about database, like username, database name, password |
DatabaseManager.php | Class | This class is a layer above MySQL and take care to connect to database and perform required task and close connection. |
QueryManager.php | Class | A Layer above DatabaseManager. This class perform Select, Update, Delete queries on database. |
queryManagerTest.php | Example | Simple file to show, how we can use methods from QueryManager.php |
Readme.txt | Doc. | Describes the usage of QueryManager |
mysqlwrapper-2007-12-30.zip 7KB | |
mysqlwrapper-2007-12-30.tar.gz 5KB | |
Install with Composer |
Needed packages | ||
Class | Download | Why it is needed | Dependency |
---|---|---|---|
PHPLogger | .zip .tar.gz | This is required to log error/debug/warning message | Required |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.