2. Custom SQL

fmCustomSQL, fmAddNewSQLDialog, fmEditExistSQLDialog, fmDialogCustomSqlEditor, fmCustomSqlFillParamDialog, fmMySQLHelp - Custom SQL Section

    If you are using the Standard Edition of Store Manager for Magento, the Custom SQL section will be disabled.
To use the features in this section, you will need to upgrade to our PRO Edition. Please click the following link, for additional information: http://www.mag-manager.com/store-manager-for-magento-plans-and-pricing

The Custom SQL section facilitates direct modification, and management of your Store database, via User created and specified, SQL commands. Typical usages are increasing item quantities for products of a specific manufacturer, or to remove discounts, that were previously applied to particular items, within the Store database.To take advantage of this feature, select the Tools tab, and choose the Custom SQL section, which subsequently allows for direct manipulation, using SQL language queries and commands.

Custom SQL

When you open the Custom SQL page, it should be apparent that it resembles the Create New Report page(s).

custom SQL tabs

The page contains 3 tabs, Edit, Results and Logs, and is divided into two sections: The top section displays the contents (SQL text) of the query, and the bottom section displays a list of all available queries. 

You may also open, and execute, a previously saved SQL Query file, by clicking on the icon, illustrated below.

Open SQL guery from a file

When creating a new query (by clicking the New SQL icon), you will need to specify its name, and click 'OK', to begin. 

New Custom SQL

At the bottom part of the page you'll see the query with this name created. Now you can either run a Query builder or write query text in the top part of Edit tab directly. 

Run query builder

When you're finished with this query hit the save button. Then you can execute it by pressing the Execute SQL button. 

Execute SQL

The Results tab will appear, showing the returned data, arranged according to a certain condition.

If the query wasn't executed, you can check the Logs tab for errors. 

Logs tabs

Logs tab will be cleared after you close Store Manager.

When constructing complicated queries it's more convenient to use Visual Query Builder.

Visual query builder form

This section can be used to work with your store DB, fetching data easier and faster.


By eMagicOne Inc.