How many types of ready states in ajax?

There are 5ready state in ajax. These are as follows

ready state 0: request not initialized

ready state 1: server connection established

ready state 2: request received

ready state 3: processing request

ready state 4: request finished and a response is ready

How to log all Magento 2 SQL queries?

In your app/etc/di.xml, replace the line:

with

 

Find-replace text in mysql field

Syntax :

 

Example :

 

Magento 2 – How to get value in “core_config_data” table

First you need to include the Magento\Store\Model\ScopeInterface class in your constructor:

Then in your class’ method you can call the following:

 

How to bind an action after customer login success using Magento?

Add the event to your module’s config.xml file
(app/code/local/Namespace/Modulename/etc/config.xml)

Now create a model Namespace_Modulename_Model_Observer

(app/code/local/Namespace/Modulename/Model/Observer.php).
Add a customerLogin() method to the class:

 

Load Customer By Id Magento 2

Add Log in Magento 2 in New file

Add Magento Admin User Using MySQL Script