Questions tagged [database]

Questions related to Magento's MySQL database, for example, the table schema, plain SQL queries or database configuration. For questions about the Magento database access layer, use other tags, like: eav, model, resource-model, collections, install-script. For questions about SQL queries in particular, the SQL tag is appropriate too.

Filter by
Sorted by
Tagged with
0
votes
1answer
174 views

After migration from magento 1 to magento 2 customers giving eror

After migrating data from Magento 1 to Magento 2 When I click on customers in admin area it gives this error {"0":"Type Error occurred when creating object: Magento\Eav\Model\Entity\Attribute\...
0
votes
1answer
103 views

How to export orders by date via SQL?

I'm using a Magento 2.3 instance, how could I export my orders in a CSV file by date range via SQL? I want to have the shippingId, orderId and paymentId included in it.
1
vote
0answers
22 views

Single product page have slow loading

When I open the single product URL (open product). I wait 8 seconds or more for the page to load. Responsible for this behavior is the amount of queries that magento is performing. For this I enabled ...
0
votes
1answer
124 views

SQLSTATE[42000]: 1142 TRIGGER command denied for table 'catalog_product_index_price_replica',

Good Day I am very much a novice when it comes to this. I upgraded my store from Magento 2.2.8 to 2.3.3. All seemed initially to go without issues. However on reindexing i get the below error. ...
1
vote
1answer
162 views

Magento 2: Multiple Product Type Not Sorting Due To Amasty Extension

I'm facing a problem due to Amasty Extension. I have a category which has 1 simple product and some configurable products, but when I try to sort them, simple product always comes first although ...
0
votes
1answer
29 views

I want to enable free shipping

I want to enable free shipping if some condition satisfies(programmatically). Which event should I use and how should my observer look like..? Kindly guide.
1
vote
0answers
22 views

Adding image and video file path to the custom table from the review frontend product view page

I have created a custom table for storing review_id (as foreign key),file_path and file_type(boolean 1 for image and 2 for video) as columns. i have to add the post values from the product review page ...
1
vote
2answers
48 views

Magento 2:- Updating table value

I want to update the value of amount column in custom database table where customer_id with value of $total. $total = $array['amount'] - $arr['base_grand_total']; $sortedData = $prepaidModel->...
0
votes
0answers
44 views

Magento 2 How to get all active shipping methods via mysql?

I need to be able to query from mysql these fields shipping_method_code shipping_carrier_code for a custom shipping method (ShipperHQ) I am trying to use from the REST Api. Thanks
0
votes
1answer
28 views

When trying to upgrade I encounter the error “Cannot process definition to array for type time”

I'm getting the following error on Magento 2.3.2 when executing command: php bin/magento setup:upgrade Cannot process definition to array for type time I'm aware that this is usually caused by a ...
0
votes
2answers
51 views

check visibilty of specific product

I want to select a value for status or visibility on a specific product for which I have only the sku. I have tried many ways but did not arrive a a solution to the problem. Anyone can help me, ...
0
votes
2answers
91 views

Magento 2 :- How to add product on CMS page

I want to add product url as button for product programmatically. After clicking it should process for purchasing process. I want to add it on CMS or any custom page.(exactly how we can add it through ...
0
votes
1answer
65 views

Huge db.log in Magento 2.3.3

I enabled the /var/debug/db.log with this: bin/magento dev:query-log:enable With two page loads in front end it generated 128025 lines. Is that normal?
0
votes
0answers
8 views

Magento 1.9 is not recognising my 2 Tables bs_ScanHospital and bs_ScanPricelist in mysql Databases

This is Hospitals List Page in Magento 1.9 Admin Panel
0
votes
0answers
59 views

Magento 2: Not able to save data in database

I am fetching customer Id from magento customer model and a data from custom page and trying to save it in databse. <?php namespace SimpleMagento\Milkman\Controller\Account; use Magento\Framework\...
1
vote
1answer
77 views

main.CRITICAL: Table “catalogrule_product_replica” does not exist Magento 2

I have been getting this in my logs and phpmyadmin main.CRITICAL: Table "catalogrule_product_replica" does not exist when I try to run these 2 indexes they are failing php bin/magento indexer:...
0
votes
1answer
65 views

Magento 2 Delete All Categories from Database

I want to delete all categories from the database so I can import new ones. I need to also delete the rewrites. I tried this code: SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE ...
0
votes
0answers
19 views

How to add extra columns ( b_price and rem Columns ) to an Existing Surgerycrm Database Table in Magento 1.9?/

mysql4-install-0.1.0.php File <?php $installer = $this; $installer->startSetup(); $installer->run(" -- DROP TABLE IF EXISTS {$this->getTable('surgery')}; CREATE TABLE {$this->...
1
vote
0answers
33 views

Magento 1.9 menu and products stock problem

I have a problem with a Magento 1.9.1.1 store: categories menu in header disappears and in the meantime all the product stock seems to be unavailable. The strange thing is that the two problems occur ...
2
votes
1answer
167 views

Magento 2 : Creating popup

I want to show a popup window as soon as user logged into store. I want to show that popup only for some customer (like premium).
1
vote
0answers
15 views

2 Tables ScanHospitals and Scanpricelist not getting added in Magento 1.9…I need correct code to add these tables

$installer = $this; $installer->startSetup(); $installer->run(" -- DROP TABLE IF EXISTS {$this->getTable('scanpricelist')}; CREATE TABLE {$this->getTable('scanpricelist')} ( `id` int(11) ...
1
vote
1answer
56 views

How to join tables and retrive data

I want to join entity_id column from customer_entity table with customer_id from new_info table and want to get department column value of given customer.
1
vote
2answers
666 views

Error on magento 2 DB import

I've created a magento 2.3.2 that works locally on pc (using laragon, if it matters). Now I need to transfer site to working server, so I made a backup using phpmyadmin and tried to import .sql file ...
1
vote
0answers
82 views

Magento 2 Catalog Search ElasticSearch Resave All Products Issue

I have a Magento 2.2.2 site - hosted on a dedicated server, linux centos6, apache, nginx, which is running fine however I have had to delete and re-import attribute manufacturer - brand - all entries ...
1
vote
0answers
30 views

Magento PWA Studio Performance Optimization Tips

i try to search for similar topics online but not found any good one to cover magento side optimizations and configs and the server side ones .. as per magento side : - Need to confirm that FPC need ...
0
votes
0answers
192 views

Magento 2 Error: Base table or view not found: 1146 Table 'dbname.table_name' doesn't exist, while database import

I have a fresh setup of Magento ce 2.3.2, while importing the database with sample data in fresh database and I faced this error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not ...
0
votes
0answers
30 views

Add a column in admin review page

The above picture shows the review managed by admin. I need to add a new column near action which should have the reply of the admin. What should I do to make the new column for the admin and to ...
0
votes
0answers
16 views

Need to get multiple column details through API

I wanted to get position and department of given email id. I am able to get one of them. What is the way to get it both. Service class:- public function getInfo($email) { $CustomerModel = $this->...
1
vote
0answers
14 views

Magento chage price - phpMyAdmin

I change my price using this code: update`catalog_product_index_price` set price = price + price*0.15; He change, but after 10-30 miuntes he return me the old pices
2
votes
2answers
50 views

Not able to get data through API…!

Error is "message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5dee36e254394". When you run http://localhost:8888/magento/rest/V1/position/1 Need to get result ...
1
vote
0answers
46 views

Magento 2 How to get simple product name of a configurable product in sales_order_item table

Using the SKU as a guide (sales_order_item.sku), how can I get the simple product name of the configurable product? This code gets the configurable product name (should be simple) public function ...
0
votes
2answers
47 views

Adding data to database from custom form

I'm able to fetch data from custom form but not able to put it in database table. Here I post details of model and controller SimpleMagento\Custom\Model\Name.php class Name extends \Magento\...
1
vote
0answers
42 views

Adding data to database [closed]

I'm able to fetch data from custom form but not able to put it in database table. $model = $this->_name->create(); $entity = $this->getRequest()->getParams(); $model->...
1
vote
2answers
29 views

Undefined property: SimpleMagento\\Custom\\Controller\\Test\\First\\Interceptor::$getRequest … In controller

Error in controller :- Undefined property: SimpleMagento\Custom\Controller\Test\First\Interceptor::$getRequest .......While fetching data from custom form. Can someone provide me solution or how to ...
1
vote
1answer
32 views

Magento:2.2.8 Save response in db under custom_column created in sales_order and quote tables

I am using Custom Shipping API where I am getting response from API. Here I want to save this response to my order and quote table, I used event checkout_onepage_controller_success_action Here's code ...
1
vote
0answers
72 views

Magento2.3.3 Facing Error during Data migration

I am trying to migartion from Magneto1.9.3.10 to Magento2.3.3 but I am facing error during [Eav Step] data migration like: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does ...
1
vote
0answers
20 views

Magento 2 Custom Table Auto Increament Column value disorder

In my custom module, I have a database table with auto increment col. The columns values initially work fine but when I delete any record the value increased like this order 1,2,3,4,5,6,10,11,110,115,...
0
votes
1answer
63 views

Magento2: How to check record before save record in table?

I am adding the barcode with product SKU and product ID in a table using below code:- File Path: /app/code/[NameSpace]/[ModuleName]/Model/ResourceModel/Custom.php public function generateBarcodes($...
0
votes
0answers
13 views

Save prices with 2 decimals only in database

We have a problem with synchronizing invoices with an accounting software. The product price sent from the synchronization magento module (to the software) is rounded by 4 decimals. In the software ...
1
vote
0answers
22 views

cron_schedule table not emptying itself (deadlock error)

I just realized after cheking my logs that all the queries supposed to clean my cron_schedule table are not being executed properly. My table just keeps on growing. Here are the three exception types ...
1
vote
0answers
55 views

Magento Commerce Cloud : Tool for real time monitoring of sql queries and processes

I need to monitor the number of SQL queries and processes and their corresponding CPU and swap usages in real-time just like the monitoring tool provided with PHPMyAdmin. I need something similar for ...
1
vote
0answers
32 views

Checkout Totals Sort order not changing

When I attempt to change the checkout totals sort order in Magento 2 backend, I can press save, however the sort order doesn't seem changed from the magento 2 backend. When I look in the database, ...
1
vote
1answer
1k views

Magento 2.3 data insert using Data patch

I have created a new table and added a few data using Data patch setup/patch/data/. Now I want to add some more data and want to update few data's so can anyone please help me or guide me that how ...
2
votes
0answers
106 views

Magento 2.3 - Add a new column after one column into the table using db schema

I need to add a new column after one of the particular columns in the existing table using DB schema & checked this dev doc link, they didn't mention about the before or after column. Is there ...
1
vote
1answer
28 views

How set data in table “quote_address”

How to set data in table quote_address after placing an order? ty for answer
1
vote
0answers
155 views

Magento 2 - If search using less than min query length then it gives me error

If search less than min query length it gives me error on the front website in magento2. In catalog search, I have set min query length to 3. And if I search with 2 char length then it giving me an ...
0
votes
0answers
122 views

Issue Google Shopping Index Magento 2.3.3

Trying to setup Google Merchant from Magento version 2.3.3 Now when done and I run: php bin/magento indexer:reindex scconnector_google_feed I get an error: Column not found: 1054 Unknown column '...
0
votes
0answers
25 views

SQL update special price products

I have a strange problem with my special price query update. When I run the query, the special price is updated in the database. But when I reindex and clean the cache, the special price in the ...
2
votes
4answers
475 views

Can't import database Magento 2.3.3

I have created a backup database by command line: php bin/magento setup:backup --db Then I import it to my new PHPMyAdmin, But it shows a bug: Static analysis: 4 errors were found during ...
0
votes
0answers
23 views

magento 1.9 | process starts mysql on its own

My site automatically turns on mysql process, which loads the database and CPU sometimes to 120% and some other processes are also running, but I can’t understand what it. because of this, the site ...

1
3 4
5
6 7
68