Latest news
Home » Database

Database

change the database engine of a MySQL database table?

Different databse engines can use for database tables. Database engines are different in architecture. Some occasions demands the db engine change  of table. Usually tables are creating in MyISAM storage engine InnoDB is the another option.It has advantages over MyISAM. InnoDB gives more importance to relational schema. We can do it easily by mysql query Take phpmyadmin click on the database ...

Read More »

removing or adding a prefix on existing tables in mysql

<?php $db_password = ‘root’; $db_user = ‘root’; $db_host = “-h localhost”; // Probably localhost $db_name = ‘test’; $prefix =’smarttips_’; $remove = ‘removeprefix’;//set a a condition name if(strtolower($remove) == ‘removeprefix’ || strtolower($remove) == ‘remove’){ $removeprefix = (bool) TRUE; } else { $removeprefix = (bool) FALSE; } $renmeQuery = “mysql -u$db_user -B -p$db_password -s -r $db_host $port $db_name -e ‘SHOW TABLES;'”; exec($renmeQuery, ...

Read More »

mysql table alter query

We can use the following query for add new field to table. this types of queries are alter queries Syntax :ALTER `<table name>` ADD `<fieldname>` <type> <option> Example: ALTER TABLE `engine4_core_poll_societies` ADD `soc_admin` INT NOT NULL

Read More »