Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
23 views

Crud module for parent and children table

i'm created crud plugin for children and parent table. Can anyone suggest how to get the data from parent table.PLease Help me. Many thanks here are may table <?php namespace ThuyNT\Crud\...
1
vote
1answer
23 views

how can we access customer session in checkout

I have one special field called some_id in customer data and I want to save the some_id and quote_id in database. I am using sales_quote_save_afterevent to save both ids. But my customer session is ...
0
votes
0answers
19 views

Return PHP values inside JS file

I have an module that I need to load some informations when the user clicks at the sync button (backend). The problem is, how to retrieve the values from the js file and put them in the form. view/...
2
votes
1answer
57 views

How to fix the related product issue in admin after migrated to magento 1 to magento 2.3

I am using Magento 2.3.0 I have migrated products from Magento 1 to Magento 2. I can see related products in product detail page in the front end and it is proper and also I can find related products ...
1
vote
1answer
32 views

How do I query on an extension attribute through the API?

I added an extension attribute to the Invoice class, and I want to be able to query the Invoice database data by my extension attribute. My extension attribute (ExportedFlag) has these properties ...
0
votes
0answers
38 views

before plugin parameter magento 2

I am writing a before plugin for below public method. public function setup($user,$pass,$url = null){ $this->username = $user; $this->password = $pass; if ($url) { ...
2
votes
0answers
34 views

Magento 2 change database collation

I am wondering if it is safe to change a magento database collation from utf-8 general_ci to utf-8 unicode_ci. I can do it from phpmyadmin or directly in mysql... I just don't know if it is safe ...
1
vote
1answer
35 views

Unable to display database table values on frontend in magento 2.1.7

I am trying to fetch table on frontend but getting this error Fatal error: Class 'Crud\Crudatfrontend\Model\ResourceModel\Post' not found in D:\xampp\htdocs\newmag\vendor\magento\framework\...
0
votes
0answers
16 views

Magento 2 admin panel add new category error Integrity constraint violation [duplicate]

Below error when Magento 2 admin panel add new category [2019-04-08 22:36:22] main.CRITICAL: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null, query was: ...
1
vote
1answer
54 views

Event Observer for import with magmi

I created an event observer to report the creation of new magento products, but the observer doesn't work when the products are created by importing Magmi. My magento version is 1.9.3.9 This is the ...
2
votes
1answer
63 views

Suddenly customer_grid_flat table delete in magento 2

I am using Magento 2.2.6. My site is working fine. But today morning I show customer_grid_flat table delete in my database. Please, someone, let me know why it's doing. Also in Admin side customer ...
1
vote
2answers
85 views

Magento 2 - Syntax error on bin/magento support:backup:db

I am trying to get backup of DB using following command php -dmemory_limit=1G bin/magento support:backup:db It is giving me syntax error: sh: 2: Syntax error: word unexpected (expecting ")") Error: ...
1
vote
2answers
35 views

magento 2 add unique key on multiple columns using installschema

Here i am trying to create unique key using installSchema . Array of column names is defined here on which columns combinedly i want to apply unique key $arrayOfColumnsName = array('column1', '...
2
votes
0answers
86 views

Magento2: How to convert weight unit to grams from kg?

I have a website in Magento2. Mageto2 provides product weight unit in KG, how an I convert it into unit Gram. I want to change the product weight unit from KG to Gram how it is possible ?.
2
votes
0answers
38 views

Magento 2.2 - How to remove product Meta Keywords maxlength validation from backend?

I want to remove validation for product meta_keyword from backend or else to increase the length of the product meta_keyword. I also tried to remove maxlength validation from vendor/magento/module-ui/...
0
votes
0answers
20 views

Same DB for multiple stagings

I am creating multiple staging servers for my Magento 2 website. staging1.mywebsite.com staging2.mywebsite.com staging3.mywebsite.com Is it possible to have single database for all 3 of my staging ...
0
votes
2answers
72 views

2.3 to 2.3.1 upgrade (commerce/enterprise)

So far the upgrade went pretty smooth but now i have a few outdated modules and it's asking me to run the setup:upgrade on cli but i keep getting a SQLSTATE general error: 1813 Tablespace for table '...
0
votes
0answers
12 views

what is difference between magento1 and magento2 sales order table list

what is difference between magento1 and magento2 sales order table related data to be stored and which table to be affected. Magento1 Sales related table Magento2 Sales related table Thank you, ...
1
vote
1answer
178 views

SQL Query for custom attribute

I have create custom attribute in product upc I want custom query (sql) to get SKUs and UPCs Can anyone tell me the related tables from where I can get data, or if anyone can share query that would ...
1
vote
0answers
193 views

Magento 2: Column is exists but throwing Column not found: 1054 Unknown column 'so.event_id' in 'where clause' while inserting into sales_order

I have event_id column in my sales_order table. I want to place an order & I am not sending event_id because its zero by default. When am trying to place an order, Its throwing me the error Column ...
1
vote
1answer
43 views

Magento 1: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'status' in where clause is ambiguous

I am getting the Error: Integrity constraint violation: 1052 Column 'status' in where clause is ambiguous SELECT `main_table`.*, CONCAT(soa.firstname,' ', soa.lastname,'', soa.street,'', soa....
1
vote
0answers
24 views

import csv in mariadb

We import csv files in mariadb, 1 csv takes about 30 minutes. For daily sync of csv files thats about 3-4 hours and judge that as too much. Magento 2.3, Update on save is activated + Mysql tuner ...
1
vote
1answer
67 views

custom customer attribute value not storing in database magento 2

<?php namespace Vendor\Module\Setup; use Magento\Framework\DB\Ddl\Table; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\...
2
votes
1answer
58 views

Magento 2 delete search term through sql query

I want to delete search terms with 0 search results from magento 2 database by writing sql query in file. How can I do this?
0
votes
3answers
44 views

Magento2: How can i get all orders from database tables

I want to get all orders record from database. How many tables i have to dump for . Kindly enlist the tables names here
1
vote
1answer
94 views

Magento 2 invoice email not sending

My customer complaint they do not receive the email order. So I have to manually send them the invoice from the admin account. What cloud be the issue?
1
vote
1answer
33 views

Magento 1.9: Massive set customer confirmation attribute

I imported over 3000 customers in magento, I need to set them all as confirmed. How can I do?
3
votes
1answer
78 views

Magento 2 - Docker - Data not persisting

I'm currently running Magento 2 on Docker using docker-compose.yml here is the file: version: '3.0' services: web: image: alexcheng/magento2 container_name: magento2 ports: - "80:...
1
vote
1answer
20 views

Base table or view not exist

I want to import product or create them via the BO. Before, it's was OK, but, I don't know why, suddently, it's impossible to me to create product. Each time, I got this error : SQLSTATE[42S02]: ...
2
votes
1answer
43 views

Magento 2 master slave connection for DB

I am planning to enable Master and slave connection on my Magento site. Magento team suggest me to check my 3rd party and custom modules support this master/slave config or not. I am not sure how can ...
1
vote
0answers
68 views

How i can get Image/file Extension from uploaded image using _fileUploaderFactory in Magento 2

I am Working on custom Module In Magento 2 I m trying to upload image to database using fileUploaderFactory. try { $uploader = $this->_fileUploaderFactory->create(['fileId' => 'image'...
2
votes
1answer
39 views

Saving Custom Option Field to Database Not Working

I have the below code in my custom module, at App/Code/Ibex/Options/Ui/DataProvider/Product/Form/Modifier/CustomOptions.php and added a "weight" column to catalog_product_option_type_value in the ...
1
vote
3answers
74 views

Magento2 which table to store data like configurable product

Magento2 which table to store data like configurable product and associated related simple product and also in Magento1 which table to store data like configurable product and associated related ...
2
votes
2answers
57 views

SQL Error when I try to reindex Magento 2

I have an issue in Magento 2.2.7 where my site has the message "One or more indexers are invalid." and looking at the indexers I see the following: However when I try to run php bin/magento indexer:...
2
votes
2answers
74 views

connection “developer” is not defined

Anytime I run this to install any extension: php bin/magento setup:upgrade. I get the error - connection "developer" is not defined. I have tried to change the mode to developer and when I run it,...
0
votes
1answer
87 views

Magento 1.9.2.1 error SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'

I imported database backup through terminal . in terminal it gave error ERROR 1062 (23000) at line 1016624: Duplicate entry '0' for key 'PRIMARY' then I used the below commands to resolve this -...
0
votes
1answer
102 views

Clearing database logs in Magento 2

We've recently migrated from Magento 1 to Magento 2 and it seems that there is a large amount of information in our database files. We'd like to try to mitigate this by clearing the log files but ...
0
votes
0answers
75 views

Item (Mage_Catalog_Model_Product) with the same id “35” already exist

In admin, I can create multiple categories to shown in homepage. This all categories are called on homepage via widget. This is working as expected if all categories have unique products. Suppose One ...
2
votes
1answer
194 views

How to add select state dropdown field in custom phtml form and save in database(frontend) in magento2.2.5?

I have added a select state dropdown field in my custom phtml file. But not able to save that value in database in Magento2.2.5? /var/www/html/magento2/app/code/Amy/Contactform/Block <?php ...
1
vote
0answers
29 views

Magento2: Mysql Database Slowquery log generating and Magento2 Website going down

Below error showing when Website going down Any one know solution? When I restart server then website run again. But I want to know why server log showing below error. INSERT INTO ...
0
votes
1answer
31 views

Magento 2: 2 databases, only one with table_prefix

I have defined an additional custom database connection in etc/env.php: 'db' => [ 'table_prefix' => 'abc_', 'connection' => [ 'default' => [ 'host' => '...
1
vote
0answers
26 views

Requested store not found

I am having an issue with stores, magento is trying to find a store by id '3', it doesn't exist, due to which most of the functionality is not working. Website was migrated from 1.9.2.4 to 2.2.7, I ...
1
vote
0answers
22 views

Logging Magento 1.9 database queries. What doe the

With the below code, what does "#0000000005dc945b000055af41b2fb74#" from lines 5 and 6 represent? Is this related to the PID or session hash? Any idea. This code is taken from database queries after ...
0
votes
0answers
14 views

Magento2: Seeking advise before I make a mistake when migrating my data to new magento installation

I am looking to migrate data from my current magento2 installation to a new installation with a brand new theme on another server. I have taken a dump of the mysql database, created a new database and ...
1
vote
1answer
81 views

Magento 2 - CLI Installation - MySQL Access Denied despite correct authentication

I've been following the documentation for Magento 2.3 and am now stuck while trying to set it up on the command line. I'm executing the following: bin/magento setup:install --base-url=http://...
1
vote
1answer
42 views

Magento 1.9 - Customer placed the order successfully but its not in the Magento Admin Panel

I am facing a very serious issue with Magento 1.9 website. This has happened a couple of times. Customer places the order, they even get an email confirming the order but the order does not show in ...
0
votes
0answers
54 views

Getting Errors after MySQL database import

I took a MySQL dump of my live website and imported the data to a fresh database for my development site. However, only the homepage is working, other links bring an error There has been an error ...
1
vote
1answer
123 views

Magento 2: In which database table are the payment methods stored?

I'm working on a custom module that uses a database table that have the foreign key of both the payment methods and customer groups. I don't know which database table stores all the payment methods. ...
2
votes
1answer
459 views

Magento 2 : Foreign key constraint is incorrectly formed, ALTER TABLE customer_group

After upgrade from magento 2.1.7 to 2.2.3 and am stuck. I have tried everything. In Pdo.php line 235: SQLSTATE[HY000]: General error: 1025 Error on rename of './zwwnzwzjhe/#sql-1bd1_25f9' to ...
1
vote
1answer
36 views

PayPal Express Firstname and Lastname Empty: how to SET these fields using a query

We were having this issue PayPal Express FIRSTNAME and LASTNAME instead of SHIPTONAME Now we have many accounts where there is no firstname and secondlastname, however shipping data is correctly ...