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

custom table left join with catalog/product

I have a custom table called flagged_products which lists flagged products like this: +-----------+------------+---------------------+ | entity_id | product_id | flagged_on | +-----------+---...
2
votes
3answers
19 views

Database connection error, after CLI install?

First time Magento user here, seeking enlightenment. I did a CLI install on CentOS 7 using the following command... ./bin/magento setup:install --base-url="http://example.com/shop/" --db-host="127....
2
votes
1answer
25 views

How to Insert record in database-table through custom module in magento2

I have create a custom module and database-table using following this steps and i understand the table displaying in customer_side. Now I Need to Know the Insert operation in customer_side please ...
0
votes
0answers
8 views

Magento 2.3 - How add new column/field to sales_shipment table

I need to add a new column/field (total_volume) to sales_shipment table. I know that I can use two approaches to do this, but what is the best? The first approach is to use the "Extension Attributes"....
0
votes
0answers
18 views

Magento 2 Undefined offset during migration

I'm getting next error during migrate:data Notice: Undefined offset: 1 in /var/www/magento/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 455 $...
0
votes
1answer
18 views

magneto2 installation settings - mysql database password problem

I am trying to run the magento 2 install (default shown below). However, if I add a symbol into the password it complains and says Your password must include both numeric and alphabetic characters. ...
0
votes
0answers
19 views

M2 | How can we use same code base among all team members via Git?

We are a team of developers and wanted to share same codebase (DB, Configuration, Magento instance). We are using Magento 2 Image for Docker. Individually we are working fine with docker. Now we want ...
1
vote
2answers
29 views

How can i submit my form data in custom table magento2

my custom_tab1.phtml my custom form is here please help me how to submit form data in custom table in magento2.3 without using objectmanager
1
vote
0answers
25 views

How can I change multiple entries in DB?

In DB I have Rows: ID NAME PHONE Example: 1 Steave 33333333 2 Joe 77777 I can add and Edit any row, but I want when I click "save everyone" I rewrote all phones on DB example: 1 Steave 33333333 ...
0
votes
1answer
34 views

Insert, Update values in existing custom table and Select values from that table. Magento2

How can i Insert, Update values in existing custom table and Select values with Magento methods not sql requests ?
1
vote
1answer
20 views

Find duplicates in many columns query builder [closed]

I have this code to find duplicates, but i compare All columns in same row, also it returns only one row $groupBy = explode(',',$request['fields']); $duplicates = DB::table($module) ->...
0
votes
0answers
16 views

Magento 2.3 introduced a view table which causes issue with import of mysql dump. What's it for?

If you mysql dump a magento 2.3 store and try to import it elsewhere you get an issue due the the format of the view import query. The problem part is this: CREATE ALGORITHM=UNDEFINED DEFINER=`...
0
votes
0answers
13 views

Magento 2.3: SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)

I'm very new to magento 2.3, I'm facing some error maybe from DB side.... Here is my code: /app/code/EC/Customimport/Controller/Adminhtml/Index/Import.php <?php namespace EC\Customimport\...
1
vote
1answer
27 views

Upgrade 2.2.6 - 2.3.1 -> Table staging.queu doe not exist

I have followed all procedures to update correctly. After composer is updated and we run 'php bin/magento setup:upgrade' we get a strange error. Please see image attached. Error is Base Table or view ...
1
vote
1answer
23 views

How get products name magento 2 sql database

I am trying to get products name(value) and when i see my db table catalog_product_entity_varchar but in which in the column of value all base images are given so please tell accurate table or any ...
0
votes
1answer
17 views

Magento 2 Custom API: Need to create an API which gets the data from a table in database

I have a magento store for which I was using the Magestore Bannerslider module to show a simple carousel on the homepage. But now I am experimenting with a headless approach, and there's no API to ...
0
votes
1answer
10 views

Change Product Custom Attribute Id in Magento

I have mistakenly deleted custom product attribute. Now This attribute has been used on many places with attribute id value. I tried to create new attribute with same name but it is having auto ...
2
votes
0answers
17 views

What is the scope of source model extend and implement?

What is the scope of source model extend and implement between these two? \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource \Magento\Framework\Data\OptionSourceInterface Attribute options ...
0
votes
0answers
12 views

Edit quote qty but price incorrect for mutiple products

I would like to update quote from a order. When I update qty of a item from quotes it make correct subtotal and tax. However, when I update great than 2 items then subtotal and tax get last data ...
1
vote
3answers
80 views

Websites vs Categories

I'm currently managing a fairly large and complex Magento2 site. Admittedly, I'm more of a front-end guy. As such, I had a question. We have 82 stores (one for each corporate customer). Each store ...
0
votes
0answers
12 views

Magento2 Customer Session Issues

I am getting below error message in exception.log SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: UPDATE `customer_visitor` SET `customer_id` = ...
0
votes
1answer
27 views

Magento 2 - Add foreign key with Existing table using db_schema.xml

I try to add 2 foreign key to my table using db_schema.xml <table name="test_table" engine="innodb" resource="default" > <column xsi:type="smallint" name="entity_id" identity="true" ...
1
vote
2answers
41 views

How to save advance inventory custom field value in db in Magento 2

How to save advance inventory custom field value in DB on Magento 2 events.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
0answers
8 views

How to search/filter for ONLY empty fields in the admin panel?

I'm looking for orders that specifically did not use a coupon code, and therefore have no visible value in the "coupon" field. Which value do I search for? I tried "NULL", ""(as in, two quotation ...
0
votes
0answers
19 views

Magento 1.9.2.2 - CCSaved - Button to delete credit card information

I'm running Magento 1.9.2.2 and collect Credit Cards offline. Needless to say, I do not want to keep the credit card information indefinitely on the database. After the order ships, I would like to ...
1
vote
0answers
14 views

Magento 2 Enterprise Edition - Need to run app:config:import every time in centralized database

I am working in centralized database in Magento 2 Enterprise Edition, Every time someone changes anything (even from admin configuration) I need to run app:config:import everytime if anythings ...
1
vote
1answer
38 views

Need help with ui component and change sorting order of columns in magento 2

Have listing but need to change view of one column: <column name="status"> <settings> <filter>text</filter> <label translate="true">...
1
vote
2answers
38 views

How to write Nested Query in Grid Collection _initSelect method

I want to Apply this Query using $this->getSelect() method SELECT * FROM (SELECT * FROM customer_grid_flat ORDER BY enroller_id, entity_id) customer_grid_flat, (SELECT @pv := '$id') ...
0
votes
2answers
17 views

when the searched product does not exist in database then how to show that searched product?

In the search engine i have searched one product.that product not in the database but product is moving to add to cart page and store in the database and it will show the message not in stock but in ...
0
votes
1answer
40 views

Magento 2.3.1 Base table or view not found

Magento 2.3.1 keep filling logs with these errors: system.log [2019-05-04 23:30:12] report.INFO: SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`...
-3
votes
0answers
25 views

The address xxx.xxx.xxx is not in the database

we are using GeoIP data extension but face an issue like below public_html/var/report]# cat 253668948205 a:5:{i:0;s:51:"The address xxx.xxx.xxx.xxx is not in the database.";i:1;s:4435:"#0 ...
2
votes
0answers
14 views

Custom feed get only hidden image Magento 2.3.1

I am working on a module which creates an xml feed for a price comparison engine. I need in there to pull only the hidden image of the products that exist in the xml. All products have one hidden ...
0
votes
0answers
9 views

How to apply Foreign key to customer EAV in magento 2?

I have inserted the eav attribute using InstallData.php for customers like this, it's working fine but now i need to connect this attribute to school table in the database using foreign key. Can i ...
0
votes
1answer
10 views

EntityManager is trying to insert an existing row instead of updating the row

I have an extension property on Magento's Invoice class, and I'm trying to make an API method that sets the value of my extension attribute for a specific invoice. I'm using my class as an extension ...
2
votes
1answer
22 views

Unable to access the PUT API service of Magento 2 through Python

I'm trying to update a particular product in Magento through PUT using python. I'm using OAuth1Service for authentication to Magento 2. GET products is actually giving me all the products in Magento ...
0
votes
0answers
35 views

Category page not working Magento 2 with more than 13 million products

I am stuck in an issue with Magento 2 has more than 13 million products. We have managed to upload 13 million products although is slow and it works like indexing, product page, and search page. My ...
0
votes
0answers
35 views

SQLSTATE[42000]: Syntax error or access violation: 1235 This version of MySQL doesn't yet support Magento 2

I am facing below error while run setup upgrade commands. SQLSTATE[42000]: Syntax error or access violation: 1235 This version of MySQL doesn't yet support 'multiple triggers with the same action ...
0
votes
0answers
14 views

Magento2: Cardinality violation: 1241 Operand should contain 1 column(s)

When i delete the item from cart then got the SQLError below: SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s), query was: SELECT `catalog_category_entity`.* FROM `...
-1
votes
0answers
33 views

How to insert data to custom table in magento 2

i want insert my data to table "table_name". Please help me My data array(2) { [0]=> array(2) { [0]=> array(25) { [0]=> string(5) "id" [1]=> string(4) ...
1
vote
1answer
48 views

Magento 2 : Delete all Calalog Price Rules Programmatically

I know we have Delete Rule option when we edit any Catalog Price Rule. But I need to delete all Calalog Price Rules programmatically because there is no option to delete all rules. Solutions may be : ...
1
vote
1answer
44 views

echo my sql query in magento

here is some minor question but it always bother me while doing the code with magento. $resource = Mage::getSingleton('core/resource'); $write = $resource->getConnection('core_write'); $table = $...
0
votes
1answer
26 views

SQL STATE Error while setup:upgrade in magento 2.3

Getting this error when adding the new module, i don't have this table in database but i am getting this error, anyone can help?
0
votes
0answers
16 views

Magento 2 : Error when importing customers

When trying to import Customers from the backend, Data validation is OK but when I click on import button, the page gets stuck on please wait for loader and I get the error : See the logs below ...
0
votes
0answers
23 views

Magento 2 data not fetching from table for special content

I am developing a custom module where I create a column in database and saving the below content data <?xml version="1.0"?> <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> ...
1
vote
1answer
20 views

Multiple Database Records with Same Primary Key

I need to store relationships where a single attribute_id may be visible in multiple store_id and I was trying to use attribute_id as the primary key. It would be something like this: +--------------+...
0
votes
0answers
15 views

Add Customer Attributes through Admin Form

I'm trying to build a extension where I can dynamically add new Customer Attributes just like I would do with Product Attributes. The thing is that I'm new to Admin Grid and I'm not finding the a few ...
0
votes
1answer
35 views

how to update data in database table

I am sending data to the database by checking duplicate data. But I can't be inserting/updating data in the database. protected function saveEntityFinish(array $entityData, $table) { $...
0
votes
0answers
36 views

What is best way to move database from Magento 2 to Magento 1

I wanna move product category order from Magento 2 to Magento 1. what is the best way for this? I create export from product and import to Magento 1 by default tools on manage but I get some error ...
1
vote
0answers
20 views

Insert order data from csv programatically in Magento 2.2

I have 2 different CSV files 1st has orders and 2nd have order details. I am trying to insert data into magento2 DB using Magento Models. so that my data will insert into all different tables and will ...
1
vote
1answer
24 views

Magento 1.9 MIME ENABLE

My Website is not show product slider missing due to MIME enable please help me how to fix this issue please check attachment screenshot images www.hafeezpk.com