Show tables listing in Database schema order by table rows


The following query will shows tables in database.


TABLE_NAME, table_rows, data_length, index_length,

round(((data_length + index_length) / 1024 / 1024),2) as “Size in MB”

FROM information_schema.TABLES

WHERE table_schema = “database_name_here”

ORDER BY (data_length + index_length) DESC;


css style issue in Codeigniter

When you add any CMS editor such as tinymce or ckeditor, you might have encountered an issue where you find that any external css style added for an element is wiped off (<span xss=removed>) by codeigniter before saving to database.

This happens due to external security in codeigniter core files that remove any risky code from POST variable.

To get this workaround open System > Core > Security.php and find $evil_attributes array and remove ‘style’ from array options.

// enter your allowed url such as ‘/admin/edit_user/3’
$allowed_path = array(‘/admin/edit_user/3’, ‘/admin/add_user’);
static $evil_attributes = array(‘on\w+’, ‘xmlns’, ‘formaction’, ‘form’, ‘xlink:href’, ‘FSCommand’, ‘seekSegmentTime’);
} else {
static $evil_attributes = array(‘on\w+’, ‘xmlns’,’style’, ‘formaction’, ‘form’, ‘xlink:href’, ‘FSCommand’, ‘seekSegmentTime’);