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
0answers
16 views

Magento2 Admin Grid first (Base table) table data store foreign Key table data not store

In Database data store 2 table using foreign key First table store data while another second table does not store data. public function __construct( Context $context, CancelFactory ...
0
votes
2answers
30 views

output information from the database magento 2

/Block/Reviews.php <?php namespace Training\Reviews\Block; use Training\Reviews\Model\ResourceModel\Reviews\Collection; use Magento\Framework\View\Element\Template; class Reviews extends \...
1
vote
1answer
35 views

Fatal error: Uncaught Error: Call to undefined method Training\Reviews\Model\ResourceModel\Reviews\Collection::addAttributeToFilter()

I want SELECT COUNT (*) FROM name_table WHERE result LIKE 'likes%' to be executed, and a numeric value is displayed on the page.How do I do it? I'm a beginner. I'll be very grateful for your help! /...
1
vote
2answers
291 views

Fatal error: Uncaught Error: Call to a member function select() on null.Magento2

<?php $connection = $this->getConnection(); $select = $connection->select(); $select = $model->getCollection() ->select() ->count() ->from($this->getDbPrefix() . '...
0
votes
1answer
50 views

Where and how is stored the value of “Use default value” checkboxes in Magento 2 database?

On my Magento 2 website, I have multiple stores. On the product page of each store, description is not shown because it's defined globally and each product has the "Use default value" checkbox ...
0
votes
0answers
28 views

Catalog product index website is empty

From time to time the record of this table is deleted. Catalog product index website is empty Tech details: PHP 7.0.33 Magento v2.1.18 Apache/2.4.25 (Debian) 10.1.41-MariaDB-0+deb9u1 Debian 9.9 ...
0
votes
0answers
24 views

Where in the code does the database SELECT take place?

Where is the code in Magento that performs the SQL SELECT for a model and/or collection? I'm trying to trace through the code, but once Magento starts calling interceptors, object managers, and so on,...
0
votes
2answers
67 views

SQLSTATE[HY000] [2002] No such file or directory in magento 1.9

for no reason in getting this error on There has been an error processing your request SQLSTATE[HY000] [2002] No such file or directory
0
votes
0answers
25 views

Magento2 - How to create a backend module to insert data into a table?

I want a module to insert data into a custom table, created a custom table also created a menu in the admin menu now how can I add details to the table from the admin -> menu -> module name. ...
0
votes
0answers
10 views

How to create/change category and filters relations inside Magento database?

I want to change and remove filters in one category of Magento. My problem is that it's impossible to be done by admin interface because Magento returns an error. Once it is an urgent task, I would ...
1
vote
0answers
23 views

Update product data in magento 2

I am trying to update product data programmatically through scripts. The data gets updated in database but not getting reflected in admin panel. I am using magento 2.3.2 Here is my code $product = $...
0
votes
1answer
20 views

Sql error thats been asked about before - Syntax error or access violation: 1118 Row size too large

Magento 2 When attempting to reindex - the usual error. The limitation is 65535. By others calculations it is number of varchar attributes * 255. However, in my case, the sql create statement for ...
0
votes
0answers
9 views

Whenever I fill up the below form and clicking on Save Item Button Data should go to New Scan Orders/New Health Checkup orders Page

Girish/checkupforms is the model for New Health Checkup Orders Page Girish/forms is the model for New Scan orders Page public function saveAction() { if ($data = $this->getRequest()->...
0
votes
0answers
20 views

Error installing on Windows IIS

getting the followingg error when doing the setup on a windows server running IIS. Any ideas why this could be happening? [
0
votes
0answers
14 views

Magento 2 override database connection

I'd like to be able to override the database connection that M2 is using depending on what user is logged in (think multi tenant system). Can anybody point me that the database connection class / ...
0
votes
0answers
98 views

Slow Query Magento 2.3.0

One of the query is taking 1,197.66ms as per the DB profiler. SELECT COUNT(DISTINCT e.entity_id) FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_category_product_index_store1` AS `cat_index` ...
1
vote
3answers
162 views

Anonymizing Magento 2.3 DB with fake data

I have tried to anonymize my Magento 2.3 DB with fake data and tried several tools. They are either too complicated or not working ... Anyone knows of a good tool or way to replace all data with ...
0
votes
0answers
19 views

Magento 1.9.4.3 - Print in foreach the columns titles of a table of database

I recreated this question in this section because this is an operation that I am trying to do from the Magento database. So, in my database table "sales_flat_order" I have created 5 columns which are ...
0
votes
1answer
18 views

How to get the product name by the sku in an inner join

I am trying to do a join from inventory_source_item (sku column) to get a list of product names. i currently have SELECT * FROM `inventory_source_item` order by source_item_id desc limit 61 What ...
0
votes
1answer
14 views

I created one landing page, when customers fill all the details it should display in the custom module grid in magento admin panel

I created one landing page, when customers fill all the details it should display in the custom module grid in magento admin panel, how can i implement, <form action="">, what to put in ...
0
votes
0answers
15 views

Access Magento 2 Database using Getpostman

I am trying to find the resource in order to download Magento2 database using getpostman, I have setup env of GETPOSTMAN Not sure if It's possible somehow to generate Magento2 Database from some ...
0
votes
0answers
42 views

Data scaling in magento 2 like integration nosql to load product data from nosql

How we can integrate nosql with magento to load pages data faster than mysql
0
votes
0answers
23 views

Magento 2: How to allow updating a null value for a column having foreign key constraint?

I have 2 tables A and B A id name B id name a_id FK references A(id) I used the Magento's upgrade script to add both tables, everything was created correctly, however when i tried to setting a_id ...
1
vote
2answers
36 views

QLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.vgroup_testimonial' doesn't exist, query was: DESCRIBE `vgroup_testimonial`

I have installed an extension for testimonial by V Group Inc. after the installation when i tried to add testimonies, the extension was giving me this error SQLSTATE[42S02]: Base table or view not ...
1
vote
2answers
23 views

2.3.3: Moving to an updated version of a website

I need to move from my old version of my site to my new one. I have imported all the orders although I did this manually as the products structures completely changed. I would like to know a reliable ...
0
votes
3answers
54 views

How to use one database for each store or website?

Let's suppose that I will create an e-commerce for a restaurant chain that has several restaurants and in each restaurant the menu is a little different. The user will enter the website and input its ...
0
votes
1answer
29 views

How to assign guest orders to registered customers by email via SQL?

I'm using this SQL below to manually assign guest orders to registered users. UPDATE sales_order SET customer_id = {YOUR CUSTOMER ID}, customer_is_guest = 0 where entity_id = {YOUR ORDER ID}; UPDATE ...
0
votes
0answers
11 views

how can i move the product tab section to the below of the product gallery with 50% width in magento 2

how can i move the product tab section to the left of the gallery section with the width 50% which is now having 100% width in magento 2.3.3 please help
2
votes
2answers
693 views

Magento 2: How to dump database from Magento cloud

How to dump the database to local system from Magento Cloud server with Magento 2 Commerce. I have only access to the ssh but that ssh user doesn't have write permission into the server. So by any how ...
0
votes
1answer
27 views

magento 2.1.5 unable to add product getting mysql error

i am getting below error while adding product in magento 2.1.5 SELECT `e`.* FROM `catalog_category_entity` AS `e` WHERE (()) 2 exception(s): Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[...
0
votes
0answers
25 views

how to get unique id from custom database table in magento 1 for pushing that id into google analytics

I have created a custom table in magento 1.9 now I want to get the unique id from database, how can I get the unique id from magento database. Here is the code <?php if(Mage::getModel('surgery/...
0
votes
0answers
34 views

Changing the CopyRight Notification Year from 2019 to 2020 in Magento 1.9

I tried out Admin -> System -> Configuration -> Design (left menu) -> Footer -> Copyright but it is not changing the Year from 2019 to 2020....Any correct solution ...Reply back to this Question as ...
0
votes
2answers
47 views

Product QTY update Slow

Long time reader, first time asking... Not sure if this a magento issue or other. I use Firebear import/export tool to update the stock qty, approximately 105,000 SKU's. Worked fantastic for about ...
0
votes
0answers
34 views

catalogrule_product_price Table Gets Deleted From Our DB After Running Rapidflow Job

I'm not sure if this had happened to anyone before but our website uses Rapidflow extension and we had a cron job running at night for Products and Products Extra data type. We usually had the job run ...
0
votes
0answers
68 views

Can Magento2 work properly with Azure Managed MySQL?

I have been attempting to get Magento2 to work in Azure for awhile now. There are some issues I'm running into that make me think that magento can't run in an Azure managed MySQL: No support for ...
1
vote
0answers
22 views

How to add several input fields per entry - admin form in Magento2? [closed]

I want to be able to edit one poll and it's answers in one admin form, and have one input field per answer. I already have my collections ready, how can I create a working admin form ? POLLS TABLE ...
0
votes
1answer
89 views

how to switch between mariadb and mysql

my magento2 is reading mariadb server and database is connected to that, I am trying o use mysql instead but I had no luck, it does not recognize the database at all although I have added the ...
0
votes
0answers
37 views

Missing group price after migration M2

After migration From Magento1 to Magento2 Group Product Price Missing I have followed below step Not solve this issue plz help me Step 1 Run query in M1 DB and download resule csv file (without ...
1
vote
0answers
23 views

Joined tables in admin form

I have two tables, one for a list of poll questions and another for the answers to a specific poll. I want to be able to display the list of questions in a grid, then save the question and the answers ...
0
votes
0answers
32 views

Wrong with processing the default view and we have restored the filter to its original state

Anyone can help me regarding this issue? why this error is occurring in Magento 2.3.0. I transferred my website from localhost to live server, On the live server, I'm facing this issue in under ...
0
votes
1answer
25 views

How to get the values from different rows and same table in mageno2

I want to get filter_options(804) value based on the condition filter_ids=13 and filter_ids=7 and filter_options=575 for the same sku. How to do that. Thanks.
0
votes
0answers
24 views

Database import Error in Migration Magento 1.9 Store

I am migrating a Magento 1.9 store to another hosting. While I am importing previous database to new phpmyadmin I am getting below error.
0
votes
0answers
26 views

Magento 2 usage of UNION in a custom query?

I am working on a module to remove images of all deleted products, which is not the standard M2 behavior. My initial query to found images path still used by products was : $connection = $this->...
1
vote
1answer
32 views

how to change default sort by price to custom attribute like gtin in magento 2

i have already tried to make the chanage of sort by price to custom attribute in admin store configuration but still the products are sorting by price in magento 2
0
votes
0answers
17 views

Magento 1.9.2.2: Restore newsletter subscribers only from db backup

I managed to delete all my newsletter subscribers, but I have a magento db backup. Is it possible to restore the newsletter subscribers only (incl. all their info - password, registration date,...) ...
1
vote
1answer
41 views

What tables contain customers + products information?

after a data migration problem (please check language translation and migration if interested on issue) I thought on alternatives. a) Export csv with products + clients and reimport on clean install. ...
0
votes
0answers
25 views

Add Import Export functionality to my custom grid in Magento 1

I want to add Import and Export functionality for my custom grid records of my custom module. I had created a custom table in the database. I want to add Import and Export functionality using PHP code....
0
votes
0answers
29 views

Rebuild Customer grid index not working - Getting Error

anyone can help me about this issues, i'm getting this error. I'm trying to fix it, But i could not found any solution. {"0":"Notice: Undefined index: PK_CUSTOMER_ENTITY in /vendor/magento/module-...
0
votes
1answer
173 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 2 3
4
5
68