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

How to synchronize Magento Cloud environments?

I have three environments, Production, Staging, and Integration, I'd like to sync Integration DB and Code as its parent environment, which is Staging. How could I sync the database and the code?
0
votes
1answer
46 views

Empty rows in quote tables

I noticed that my database size has been increasing a lot since moving over to Magento 2. Looking at the table sizes, it all seems to be relating back to quotes. The largest tables are: quote_address ...
1
vote
1answer
504 views

Magento 2.3 - How to bulk import attributes values?

What is the best practice to bulk import attributes values. How to do it by hit tables?
0
votes
1answer
50 views

How to Save data from Checkout new Steps in Magento 2?

I want to save data from Checkout new Steps in Magento 2 ? I have created two text fields in My Step Two Title Tabs which is successfully created but how to save those value in database after ...
1
vote
1answer
652 views

Mysql error in Magento 2.4 during the authentication

Why do I see this issue below during the installation of Magento 2.4? SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
0
votes
0answers
9 views

Fields created with data patch are not storing data

I created a few new fields for the customer signup form. The ones that were added through the InstallData script work just fine. The one's that I added with a patch are created in the database, but ...
-1
votes
1answer
34 views

i need to update table records in magento?

"UPDATE mytable SET column1 = value1, column2 = value2, ... WHERE status = 'pending'"; how can i write above query in magento2 ? I try this. $postData = $objectManager->create('vendor\...
0
votes
0answers
12 views

How can I get values out of html forms on the frontend?

I added a few fields to the signup form, but I needed some additional functionality, so I did it as a uicomponent. I don't know how to get the values into the backend. I have a custom field called &...
0
votes
0answers
9 views

Can I have a required field based on a condition?

I created a new EAV attribute for customer called "existing customer". it's a yes/no question. I have an option that comes up if the person clicks on 'no' called "what are you ...
0
votes
0answers
21 views

Sales Order Custom Option query

I wanted to do a simple MySQL search for the "Custom Options" that customers input when making product purchases but I wasn't sure where to look. Most of what we use is the "Text Field&...
0
votes
0answers
223 views

Magento 2.3 Update Stock via Database - Multi Source Inventory

I was hoping to get a grasp on the how Stock levels(Qty of a sku in stock) are stored in the database with the changes to MSI. Now that we have stocks and sources I'm unsure what all tables we need to ...
0
votes
0answers
17 views

possible to write payment gateway log (braintree) into database?

Is there anyway or reference I can follow, so no matter success or fail of payment transaction result from Braintree, record can be store in database table?
1
vote
1answer
40 views

Merge database only products

last night some products where deleted around 100 items. I have the last backup of the database, is there a way to export only products from old backup and import them? Every help is appreciated
1
vote
1answer
533 views

Magento 2 Price not updating in all store views when scope set to global

In my magento 2.3.5 instance I am trying to switch price to global scope. I don't need the function to have different price for a product in each store view. Unfortunately this store is migrated from ...
0
votes
1answer
198 views

Sync Magento 2 Customer & Orders data to external mysql database

I want to take data from Magento 2 DB to another custom MySQL database. What are the possible solutions? Should I use Magento provided APIs? The issue I see in this approach is when and at what time ...
0
votes
1answer
109 views

Magento 2: What's the difference between Store and Group?

I want to create a Store programatically, but if it already exists, then return the existing store. So far my code looks like this: private function _getStore($website, $storeName, $storeCode) { ...
0
votes
1answer
76 views

Magento2 Installation Error help

Hello I have Downloaded MAMP and Magento using but Can't INSTALL! First I used this download magento, composer create-project --repository-url=https://repo.magento.com/ magento/project-community-...
0
votes
2answers
408 views

Magento 2.3.5 - Large table scconnector_google_feed_cl

We found a 'large' table on our completely clean Magento 2.3.5 store, that we run some indexes after we added a few products. Is there anyone who can tell us what table scconnector_google_feed_cl is ...
0
votes
0answers
203 views

SQL Query for get all orders with customer and shipping data (sql query)

Need help making a query that returns the data: Customer Code, Customer name (first – middle – last), Customer Email address, Customer Phone, shipping Address (full address data segmented), Order ...
0
votes
1answer
13 views

Assign attribute to a product using mysql Magento 2

I am trying to assign attribute to a product in mysql, but not able to do so. Any idea how to do it ?
1
vote
2answers
105 views

Magento 2 Aftet Migration Error - Reindex No Such Entity Error

[root@test]# php bin/magento indexer:reindex Design Config Grid index has been rebuilt successfully in 00:00:00 Customer Grid index has been rebuilt successfully in 00:00:00 Product Flat Data index ...
0
votes
3answers
30 views

Script to round all product prices in database to 2 decimal places

What is the best approach to go through all products PRICES (price, final price, promo price, group price ...) and round them to 2 decimal places. for example: 28,1200 -> 28,1200 28,1255 -> 28,...
0
votes
1answer
77 views

Magento 2 : How to generate programmatically wishlist sharing code

i have Magento 2.3 and i want to manage customer wishlist via database. I understand how it works but i don't know how can i generate sharing_code on my php script. Thanks Antonello
0
votes
0answers
39 views

Magento 2.3.4 - Reindex Catalog Search MySql Error

I am trying to reindex the Search however, I keep getting this error; any hint? bash-4.2$ php bin/magento indexer:reindex catalogsearch_fulltext Catalog Search indexer process unknown error: SQLSTATE[...
0
votes
0answers
46 views

Export Reviews Details With SKU - Magento ver. 1.9

I want to export reviews details with product data from Magento 1 I am trying to transfer product reviews from M1 to M2. can you please give me any solution how to i'll do this ? Which Mysql query i'...
0
votes
3answers
79 views

Multiple Duplicate Querys overloading Magento 2

We are currently experiencing an issue were our site runs fine for about 3 hours, but then our MySQL server crashes as a result of one query being run up to 300 times at once. The query is the ...
0
votes
0answers
36 views

How to customize SQL query

I have 1 module with model, resource model and collection. Now I can get data with SQL query: SELECT main_table.* FROM table_abc AS main_table; I want to customize this query by adding WHERE clause (...
0
votes
1answer
25 views

Product Attribute value In Magento schema

Where is the product's attribute value is stored in magento 2 DB ?
0
votes
0answers
73 views

SQLSTATE[42000]: Syntax error or access violation Magento 2

I face the error when run command: upgrade, reindex, I have try all solution on many reports but not solved this SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'created_in' ...
0
votes
2answers
87 views

Notice: A non well formed numeric value encountered

I'm trying to format the DB timestamp to 'm:d:y, something like 07/06/20`. Please change the piece of code below to help achieve it. echo $dbh->Record['fulfillmentDate']; Returns 2020-07-02 02:...
0
votes
1answer
21 views

How to remove all special prices for a specific customer group

I accidentally uploaded special prices for an erroneous group of customers. How to remove all special prices for a group of customers, not login (customer_group_id = 0) for all products and items from ...
0
votes
1answer
26 views

Connect the database to MSSQL

I want to connect Magento 2.3.5 to MSSQL database to export records about new orders like (product ID - Quantity sold - price - customer information) So what are my options? Before I post this ...
0
votes
1answer
84 views

Importing orders from .csv into Magento 2

I've got some orders from M1, exported into a CSV that I need to add to Magento 2. There aren't too many so I don't mind doing it manually. I've found that adding orders through the order section of ...
1
vote
0answers
20 views

Can I use a different DB with my Magento 2.3.5?

I have done some work on a site, basically theme, graphics, content and such. I want to keep that work without losing it but I need to use a different database. The current one got corrupted when ...
0
votes
1answer
173 views

Integrity constraint violation: 1062 Duplicate entry for key 'EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_NAME'

I've created a custom module that includes a script (InstallData.php) that adds a new attribute to an existing attribute group (Product Label): 'group' => 'Product Label' However, when I enable ...
1
vote
2answers
867 views

how to SET FOREIGN_KEY_CHECKS = 0 in phpMyAdmin [closed]

I am trying to truncate some mySQL tables from phpMyAdmin web interface, but for foreign keys constraint I am not able to do it. Is there a way to SET FOREIGN_KEY_CHECKS = 0 in phpMyAdmin?
2
votes
1answer
136 views

Should I close the connections?

Just a question, is it a good practice to close connections after opening? I open connections as follows: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of object ...
0
votes
1answer
104 views

How to add Data to Custom table in database using model in magento 2.3.5

I am created one form for contact and i want to insert form data into custom table in database in magento 2.3.5 so can anyone have idea about it then please send me solution. <?php namespace Aspl\...
1
vote
0answers
228 views

Error “DDL statements are not allowed in transactions” while create new product In Magento 2.3.4

When i try to create new product it showing below error "DDL statements are not allowed in transactions" I have done research and found that in "vendor/magento/framework/DB/Adapter/Pdo/...
0
votes
1answer
92 views

Upgrading from Magento 2.2 to 2.3 Undefined index

I created a new installation of a Magento 2.3.5-p2 and I want to use or get the data from a database that were used in a Magento 2.2 installation. I corrected the type from some tables that could not ...
0
votes
1answer
99 views

Error while retrieving wishlist data

i am trying to retrieving wishlist data and this error appears [2020-06-22 08:41:10] report.CRITICAL: Report ID: webapi-5ef06ea694149; Message: SQLSTATE[23000]: Integrity constraint violation: 1452 ...
0
votes
1answer
142 views

try to export getting export.php error as follows

I trying to export db but getting the error export.php: Missing parameter: what[a@doc/html/faq.ht!ml#faqmissingparameters@documentation] export.php: Missing parameter: export_type[a@doc/html/faq....
0
votes
0answers
21 views

Magento 2 $wishlist->addNewItem($productId); not working

I am trying to add wishlist item but its not working in post man it works with http://localhost/m233/rest/V1/wishlistapi/1/1 but not working with http://localhost/m233/rest/all/V1/wishlistapi/1/1 ...
0
votes
1answer
23 views

Cannot filter the data collection

I'm trying to filter the data collection from 4 hours to now and I have the below code but its not working. public function getWishlistProduct($wishlistid){ $to = date("Y-m-d h:i:s"); $from ...
0
votes
1answer
33 views

You cannot define a correlation name 'link_attribute_qty_decimal' more than once

Have this problem for an API feed: You cannot define a correlation name 'link_attribute_qty_decimal' more than once at public_html/vendor/magento/framework/Webapi/ErrorProcessor.php:208, ...
0
votes
0answers
22 views

Add extra Newsletter types

I am learning Magento 2 and to put it into practice I want to develop a module. Today by default Magento 2 registers Internet users on a single list, the idea would be to allow the visitor to choose ...
0
votes
0answers
12 views

Does having a lot of NULL values slow down my site?

I have a store with about 13k skus. The company that I'm doing the job for hasn't broken anything down into attribute sets. The result is that an attribute that's used on 10 products gets added to the ...
1
vote
0answers
82 views

reindexing DB corruption?

I have been issues for a little while with my indexer not running. I cleaned up most of the errors that I saw by running "bin/magento indexer:reindex" manually. In that case, from googling around, ...
1
vote
0answers
28 views

Magento 2.3: Copy base,small,thumbnail image from store view to store view with SQL

In a particular store view, some products doesn't have set the base, small and thumbnail image. I want to set this base image from one store view to another via SQL. How to do that?
2
votes
0answers
48 views

How to create stored procedure with Magento 2.3.x setup script.?

I'm trying to create MySQL stored procedure using Magento 2.3.x for one of my requirements. I found that that there is no way in Magento 2.3 declarative schema by which I can create that. But if the ...

1
3 4
5
6 7
71