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 email@example.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.
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:
- This class included all the information required to connect to the database.
- 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
- 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.
- This php file tells us the way to use the methods defined in QueryManager.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 firstname.lastname@example.org