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
8 views

Is it possible to set up redash on the same hardware as a magento instance?

I am trying to help a friend figure out if it’s possible, and look for any tips, on getting a redash server up and running on a machine running magento 1 (going to be migrates to 2). We have read the ...
0
votes
0answers
8 views

are there any housekeeping sql queries or modules that work well with M2.4.2?

We have a single store with over 1m products, they are slowing down the site drastically. Indexing takes a few hours, cron takes a long time and the database is HUGE. Are there any housekeeping or ...
0
votes
1answer
27 views

Import database from Magento2.3 to Magento2.4

I'm new with Magento. Now I want to upgrade Magento from 2.3 to 2.4 and I already make a seperated 2.4 sites. but on my 2.3 is still using so the order is continue running. I want to know that if I ...
0
votes
1answer
18 views

How to avoid to have many missed and pending cron jobs?

This below is how my cron_schedule table looks like, how could I avoid having so many cron jobs pending or missed?
0
votes
0answers
13 views

Magento 2: Custom Product List Not Rendering

I'm using Magento 2.3.4, I have a page to view all sellers product list, but when I hit button to display product list, It shows a page like this: I checked exception.log and found this error: main....
2
votes
1answer
114 views
+50

Migrate multiple Magento 1 instance inside only one multistore Magento 2

I have two Magento 1 I want to migrate to Magento 2 withing the same instance. My goal is to have only one Magento 2 in the end. Site A => Magento 1.9.4.0 with 5 website inside Site B => ...
0
votes
1answer
17 views

Table catalog_category_product_index_store0 doesn't exist on renaming store

In my magento 2 store we have a store that was disabled for future use, now we want to use it but decided to renamed it to something else. In Admin panel under Stores > Al stores I renamed the ...
0
votes
0answers
13 views

Sql query to get best seller in stock products only (configurable, simple) both for multi source inventory store by category

i'm trying to get best seller in stock products(simple and config both) by category id : SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, IF(at_status.value_id > 0, at_status.value, ...
0
votes
1answer
23 views

Moving some information from one server to another Magento 2.3.3

We do have some issues with our Magento 2.3.3 server and we want to move all the customer, products, sales info, and all the stuff that is important from the old server to the new one. Some of the ...
0
votes
0answers
10 views

How to make a join in a collection to another table if you need to join a string to id?

main_table +----+------------+------------+ | id | name | ids_string | +----+------------+------------+ | 1 | name1 | 1,2 | | 2 | name2 | 3 | +----+------------+------...
0
votes
1answer
37 views

Magento2 : The records are not getting saved in Database

I have a crazy issue that my record in the database is not getting saved. I've made a custom module. Which has model - And i am using it in a observer event before saving the shipment from admin ...
0
votes
0answers
16 views

Magento 2 getting products use sql

I'm trying to get all products using Magento SQL. I just need to do some tweaks. If the product has a thumbnail, it should show its value and if it is null, it should show my custom text. My code ...
0
votes
0answers
41 views

how to solve email not sent error in magento?

I getting this error main.CRITICAL: Unable to send mail: Unknown error {"exception":"[object] (Magento\Framework\Exception\MailException(code: 0): Unable to send mail: Unknown error at ...
0
votes
0answers
32 views

Order Items are missing in Admin Sales -> Order

I am facing very critical error, Items are not showing in admin Sales => Order section. Customers are placing an order successfully but in Admin Sales => Order items are missing. please check ...
0
votes
1answer
17 views

Only Email value is showing in database custom newsletter value showing null value in magento how to solve it?

Subscriber.php <?php namespace Vendor\Module\Plugin\Newsletter; use Magento\Framework\App\Request\Http; class Subscriber { protected $request; public function __construct( Http $request ...
0
votes
1answer
37 views

How to save value to database from custom newsletter field in magento2?

I am getting only email value in database column my custom subscriber_name column showing null please help me db_schema.xml <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
0
votes
1answer
76 views

How to save input value to database from custom newsletter magento2

How I can add these fields in the table, display it on the form, save values in the table. Vendor\Module\Plugin\Newsletter\Subscriber.php <?php namespace Vendor\Module\Plugin\Newsletter; use ...
0
votes
0answers
13 views

How to get Identity of recently inserted for Resource Save *(Magento 2.3.5)

The answer linked here mentioned (in the comments more specifically) that I am supposed to be able to get the Id from the repository/resource), it also more importantly confirmed that $model->save()...
0
votes
1answer
116 views

Duplicate entry in DB after upgrading to 2.4.3

I am having this strange issue when trying to upgrade magento 2.4.2p1 to 2.4.3 In bin/magento setup:upgrade I get: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '543741' for ...
0
votes
0answers
17 views

Items are missing on Order Details Page

I am getting an error, when customers are placing an order then on In admin Sales=> Order details page Orders items are missing. But invoice is created successfully. All items are coming in when I ...
0
votes
0answers
22 views

SQL Query To Get Customer in sales_order table Magento 2

I Need to get customers who registered and did not buy in the last 12 months and customers with more than 5 purchases who have not purchased in the last 12 months. How can I get this in Magento 2.2.8 ...
0
votes
0answers
14 views

how to get attribute product when order and save to table in database

I have add new custom attribute for product. I want get custom attribute of product when order and save to new column in sales_order_item.
2
votes
4answers
89 views

customer_id = NULL in sales_order table?

I need to get orders data directly from the database. I have got all orders (about 18,000) since January 2020. I need to do a join to customer_entity however, I realized that about 300 records were ...
0
votes
0answers
10 views

Get attributes product when order in API

I have create a attributes GUID After order this product. When I get order API, i want attributes in the "items". Each order include many product(item) so each item have attributes GUID for ...
0
votes
1answer
21 views

add Table to database

I want add new table to DB This is my code <?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ --> <...
0
votes
0answers
20 views

Magento customer login hangs on some accounts

I have a magento 2.4.2 install, and some customers can't login into their account area, the website just hangs. They don't get no error or anything. It was that bad that it brought down a whole server ...
0
votes
1answer
25 views

Magento 2 How to add to wishlist on checkout Summary page

I want to add to the wishlist link on the checkout summary page under the product section.
2
votes
1answer
35 views

Is it safe to manually remove entries on the db_schema_whitelist.json file?

I am wondering if it is safe to manually remove entries on the db_schema_whitelist.json file. I created a table called customer_address_relationship using the declarative schema approach and then I ...
0
votes
0answers
505 views

Fatal error: __autoload() is no longer supported, use spl_autoload_register() instead in D:\XAMPP\htdocs\marimar\includes\functions.php on line 37

I am trying to run some of my code by each time, i am getting this error, i am using the lates version of php. i replaced my caused as per the error; from this function __autoload($class_name) { $...
0
votes
0answers
8 views

Magento 2 - Incorrect updated_at value for quote session

im using Magento\Checkout\Model\Session to get the current quote on the cart. $quote = $this->checkoutSession->getQuote(); $updated_at = $quote->getUpdatedAt(); my problem is the update_at ...
0
votes
1answer
23 views

Magento 2 : Ui component displaying wrong date

So I created a module where I am storing order details in custom table and later on displaying all the details in custom grid. Everything is working fine except for date field. In the database its ...
0
votes
1answer
38 views

magento2 What is the purpose of email_catalog table

I am getting some errors while importing products in admin Error code is (attached screen-shot) General system exception happened Additional data: SQLSTATE[23000]: Integrity constraint ...
0
votes
0answers
11 views

Magento 2 : get simple product data using config product id mysql query

I need some help with creating a mysql query that fetches a simple product from config product id/sku a simple product with attributes such as id name sku price Any thoughts how this can be achieved ...
1
vote
0answers
24 views

Magento 2 : Get product name using mysql query

I am using Magento ver. 2.4.2 Is their any way we can get product attributes by id using mysql query ? I also need some custom attributes for product in same query THE BELOW SQL QUERY WORKS BUT GET ...
0
votes
1answer
11 views

I have confusion take of sales_sequence_profile table in Magento 2

Can anyone explain where what's the use of this table or where it will work? Thanks
0
votes
1answer
23 views

I am getting this error PHP Fatal error: Uncaught Error: Class 'Magento\Framework\Model\AbstractModel' not found in

<?php namespace Mastering\Blowhorn\Model; use \Magento\Framework\Model\AbstractModel; class Blowhornmodel extends AbstractModel { public function _construct() { $this->_init('...
0
votes
0answers
5 views

Retrieving data from aws rds mysql database using mangento endpoint in python

I have the API end point and was able to retrieve the admin token using the curl script here. ! curl -X POST "https://website.com/rest/V1/integration/admin/token" \ -H "Content-...
0
votes
0answers
42 views

M2.4.2 - Slow Queries consuming the CPU

I am facing a very bad query that is consuming the database reflecting on the CPU badly, I need some guidance in how I can address it: SELECT `t_d`.`attribute_id`, `e`.`entity_id`, `t_d`.`value` AS ...
0
votes
0answers
14 views

Optimizing database queries on Magento 1.9

I'm currently working on optimizing my shop running Magento 1.9.3.7 and my Slow Query Log shows only one query as below: SELECT `main_table`.`entity_id`, main_table.`name`, main_table.`path`, `...
0
votes
1answer
27 views

below code gives only enable value i want both enable and disable all product in magento 2.3

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory'); $collection = $...
1
vote
1answer
19 views

Requested store is not found Magento\\Framework\\Exception\\NoSuchEntityException site shutting down again and again with this error

My magento 2.2 is going down again and again when i see log files i see this error main.CRITICAL: Requested store is not found {"exception":"[object] (Magento\Framework\Exception\...
0
votes
1answer
35 views

Efficiently update prices for multiple products in Magento 2

I have been writing a module to update the prices of an arbitrary set of products based on specific criteria. My problem is that, the update of the prices seems to be very slow. I have been using ...
0
votes
1answer
25 views

What does total_qty_ordered in sales_order table mean?

We currently migrate our old Shop Database into Magento. So we try to understand the table fields of Magento. First: Do you know an documentation about the Magento database fields and their meanings? ...
0
votes
0answers
13 views

URGENT: Is there any way to retrieve credit card information from sales_flat_quote_payment SET cc_number_enc on Mageno 1.9.4?

I was following the steps here: How to purge (delete) credit card numbers stored on Magento 1.9.1.0? and I've done the first paragraph of commands: UPDATE sales_flat_order_payment SET cc_number_enc=...
0
votes
1answer
14 views

pop up modal is not submitting and not going to controller action url?

<?php /** /** @var $block \Magento\Catalog\Block\Product\View */ ?> <?php $_product = $block->getProduct(); ?> <?php $buttonTitle = __('Add to Cart'); ?> <?php $isSaleable = $...
0
votes
0answers
25 views

Magento 2.4: How to add a new table in Magento DB to retrieve one of its fields to calculate brokerage that gets added to the shipping to Canada?

FedEx module's Carrier.php is extended in custom shipping module of our Magento store to get shipping rates for Canadian addresses. I used FedEx results object to set the carrier to custom shipping as ...
0
votes
2answers
105 views

Magento 2 How to get all customer shipping address

How do get all customer shipping address? Magento 2.3.5-p1 version for the customer table, we can use - customer_entity table name for the customer address table, we can use - customer_address_entity ...
0
votes
2answers
26 views

Query is not working?

/I need those questions whose status is 1 but its not working/ <?php $i=1; //$coll=$collection->getSelect()->where("`main_table`.`status`= 1"); //$collection->load(true);...
0
votes
0answers
9 views

How to store the data when the input fields are dynamic?

Data is stored on the basis of the name attribute and the columns in the database but here since the question can be vary so how to store it? <div class="form-group"> &...
-1
votes
2answers
45 views

I need to display table data in my custom module at the front end of the site. Its saying wrong argument for $collection

/*Showdata.php Controller\Index */ <?php namespace Eaglerocket\Customquote\Controller\Index; use Magento\Framework\App\Action\Context; use Magento\Framework\View\Result\PageFactory; use Magento\...

1
2 3 4 5
72