Archive for February, 2013

Copy Complete MySQL database

February 22nd, 2013 No comments

Here are simple ways you can make a copy of a base in MySQL. It is essential that you have access to the command line.


  • create a database in which you want to transfer data via phpMyAdmin or a similar tool

  • From the console, execute the following command:

    mysqldump -h [server] -u [user] -p[password] db1 | mysql -h [server] -u [user] -p[password] db2

    Note that between -p and [password] no spaces.

    If the command is running in the system that is not password protected (typically servers on the local computer) parameter with a password can be omitted. These commands can be executed in two steps as follows:

    mysqldump -h [server] -u [user] -p[password] db1 > dump.sql
    mysql -h [server] -u [user] -p[password] db2 < dump.sql

    In this way he created mysqldump file that can be saved as a backup.

Categories: MySQL Tags: , ,

Problem with scrolling in ExtJS 4.0.7 Grid object

February 13th, 2013 No comments

Version 4 instead of scrolling which creates browser uses his scroll. It often happens that in its content “freeze”. Version 4.1 is returned to the natural scroll. For those who still use some of the 4.0.x version here’s the solution:

Ext.define('Ext.ux.grid.Panel', {
  extend: 'Ext.grid.Panel',
  initComponent: function()
    var me = this;
    me.on('scrollershow', function(scroller)
      if (scroller && scroller.scrollEl) {
  onViewRefresh: function()
    var me = this;
    try { me.callParent(); }
    catch (e) {};

This code is set at the top of the page, or save as a separate file and load. In your code instead of calling the object

Ext.create('Ext.grid.Panel', { ...

do this:

Ext.create('Ext.ux.grid.Panel', { ...
Categories: JavaScript Tags: ,

Combobox loadMask issue

February 13th, 2013 No comments

The problem is visible in ExtJS 4.0.7. It happens, not always. The list is loaded, but the mask stays over so the combobox automatically unusable.

The problem is solved in version 4.1, but for those who are still using 4.0.7 here’s the solution. Somewhere at the beginning of the code, insert code that overwrites the original loadMask attribute:

    onHide: function() { this.callParent(); }

This code switches automatically solves the problem at all combobox fields on the page.

Categories: JavaScript Tags: ,

ExtJS4 Grid Cell click event

February 13th, 2013 No comments

If you need to Grid object react by clicking on a specific cell, not the entire row, this post is for you. It was first implemented into the ExtJS 3. On this occasion used the index of the column, can not use the name of the column used for the header.

Example of adding events would be:

listeners: {
    cellclick: function(gridView,htmlElement,columnIndex,dataRecord)
        if(columnIndex == 3) {
            // Here insert the code that will be executed
            // when you click on the 4th column in the Grid object
Categories: JavaScript Tags: , ,