Web developper watch
254 views | +0 today
Follow
Your new post is loading...
Your new post is loading...
Scooped by 10-nice
Scoop.it!

Update a Wordpress database to change engine of all tables

To change engine of all tables in a wordpress database, create a php file at root of your domaine and copy/paste the following code

10-nice's insight:

<?php

include_once( dirname( __FILE__ ) . '/wp-load.php' );
global $wpdb;
$query = "
SELECT CONCAT( table_schema, '.', table_name )
FROM information_schema.tables
WHERE
engine = '[engine_from]'
AND

table_schema NOT IN ('information_schema', 'mysql', 'performance_schema');
";
foreach( $wpdb->get_results( $query, ARRAY_N ) as $table ) {
echo( "Updating " . reset( $table ) . ": " . ( $wpdb->query( "ALTER TABLE " . reset( $table ) . " ENGINE = [engine_to]" ) ? 'success' : 'failure' ) . '<br />' );
}

?>

more...
No comment yet.
Scooped by 10-nice
Scoop.it!

10 bonnes pratiques JavaScript • JS Attitude : formations JavaScript qualitatives et sympathiques

Au fil des formations, je remarque que de nombreuses bonnes pratiques que je signale en passant dans le code, par acquis de conscience, ne sont pas …
more...
No comment yet.
Scooped by 10-nice
Scoop.it!

Mobiscroll - The customizable HTML5 spinner control for touch devices - CodeVisually

Mobiscroll - The customizable HTML5 spinner control for touch devices - CodeVisually | Web developper watch | Scoop.it
more...
No comment yet.