MySQL Prepared Statements
Prepared statements are the ability to set up a statement once, and then execute it many times with different parameters. They are designed to replace building ad hoc query strings, and do so in a more secure and efficient manner. … Continue reading
Changing MySql User Password
The mysqladmin tool can be used for changing MySql user’s password. The following line of code will change the user1′s password to “newpassword”. mysqladmin -u user1 -p password “newpassword”
Revoking MySQL Root Privilege
If we lost the root privilege or password, it can be retrieved by the following steps : Stopping MySQL : Shell Command /etc/init.d/mysqld stop wait until MySQL stops, then run the following commands : mysqld_safe –skip-grant-tables & Then you will … Continue reading
Copying value from one table to another
This can be done by using both insert and select queries. Example : Suppose we have two tables student and mark : Student id | integer | name | text | Mark id | integer | name | text | … Continue reading
PDO Connection And DNS Settings For Different Databases.
PDO(PHP Data Objects) is one of main feature of PHP 5.1 to managing databases. It is developed to provide a lightweight interface for different database engines. And one of the very good features of PDO is that it works like … Continue reading




