Latest news
Home » Tag Archives: removing or adding a prefix on existing tables in mysql

Tag Archives: removing or adding a prefix on existing tables in mysql

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 »