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.

1
vote
0answers
11 views

Magento2 change Category-Product position to string

I would like to change the category-product position to be a string. Because I have an exploded view for spare parts and they are numbered with strings (1a, 1c, 605,...). The customer should see the ...
0
votes
0answers
7 views

Magento 2 - Location path of the SQL query file which inserts orders in to database

I want to modify the values of the product items will be inserted to table 'sales_order_item' right before the order is placed. So im trying to locate where the exact query is. Also the order ...
0
votes
0answers
11 views

magento atrributes values not showing on admin and frontend

I have upgraded magento version from 2.1.8 EE to magento 2.3.1, after upgrade some attributes values are not showing in admin and frontend, like full short description is showing blank in admin and so ...
4
votes
1answer
25 views

Magento 2: Insert and select operation (without model) in custom module

Please give me any example or link for insert and select process without using model in custom module of Magento 2.
0
votes
1answer
30 views

Improving Performance

We run a Magento 1.9 online store. It contains 110,000 products. We are running into issue around long page load times for category pages and product pages. Dedicated WebApp server specs: - Apache 2....
1
vote
2answers
26 views

How to check if column exist before trying to add it to the table?

We are using the Extension FollowUp E-Mail from AheadWorks. The Extension has bugs in the sql install scripts... they are trying to add a column to a table but don't check if the column does already ...
0
votes
0answers
8 views

Magento 2 connection reset error when processing large datas

I am using Magento 2.3 in ubuntu 16.4 with apache server. I am syncing data from Dropbox csv into Magento 2 attributes. Everything working fine, but I have more than 17,000 SKU's and need to process ...
1
vote
0answers
14 views

Magento 2.x - Save same model data in multiple databases

I have a very big B2B eCommerce which is based on websites (each website has different products, customers etc). For each website I need to have different databases. I have achieved such a thing but ...
0
votes
0answers
24 views

Copying a Magento 2 Site to New Domain 'Remembers' Old Site

I have copied a Magento 2 site from a test domain (testing.mytest.co.uk) to a live domain (mylive.co.uk). It has come time to upgrade the Magento version (2.2.5 to 2.2.6) and I receive the following ...
0
votes
3answers
29 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
2answers
26 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
32 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
1answer
10 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
20 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
40 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
1answer
19 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
15 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
19 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
82 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
30 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
42 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
9 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
22 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
15 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
39 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
41 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
15 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
23 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
40 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
34 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
50 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
45 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 = $...