A foreign key is a set of one or more columns in any table (not necessarily a candidate key, let …
Page: DataBase
Duplicate MySQL Table and its Data
A simple query for create a new table from an existing table structure and insert all the data to the …
MySQL Prepared Statements
Prepared statements are the ability to set up a statement once, and then execute it many times with different parameters. …
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 …
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 …
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 …
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 …
