mysql | naveenOS https://www.naveenos.com How may I help you - E-Commerce | Full-Stack Developer Sun, 21 Nov 2021 18:00:58 +0000 en-US hourly 1 https://wordpress.org/?v=6.7 Magento2 Wrong create options MYSQL Error https://www.naveenos.com/2019/10/magento2-wrong-create-options-mysql-error https://www.naveenos.com/2019/10/magento2-wrong-create-options-mysql-error#respond Thu, 17 Oct 2019 17:55:36 +0000 https://www.naveenos.com/?p=960 On transferring a Magento website Database running on MySQL 5.7.34 to MariaDB 10.2.39, I get the following error: SQL Strict mode was already off on this MySQL server. To fix the problem, edited the db.sql file, added below line at the top of the file. After this change, the restore worked without any error. Tweet […]

The post Magento2 Wrong create options MYSQL Error first appeared on naveenOS.]]>
https://www.naveenos.com/2019/10/magento2-wrong-create-options-mysql-error/feed 0
Magento: How to merge multiple fields in a colum in Magento admin panel grid? https://www.naveenos.com/2012/05/magento-how-to-merge-multiple-fields-in-a-colum-in-magento-admin-panel-grid https://www.naveenos.com/2012/05/magento-how-to-merge-multiple-fields-in-a-colum-in-magento-admin-panel-grid#comments Thu, 03 May 2012 07:48:36 +0000 http://www.naveenos.com/?p=491 Magento provides lot of inbuild functionalities. Using “protected function _prepareColumns()” function we can create or add new column to the grid. Like: protected function _prepareColumns() { $this->addColumn('first_name', array( 'header' => Mage::helper('custommodule')->__('First Name'), 'align' => 'left', 'width' => '50px', 'index' => 'first_name', )); $this->addColumn('last_name', array( 'header' => Mage::helper('custommodule')->__('Last Name'), 'align' => 'left', 'width' => '50px', 'index' […]

The post Magento: How to merge multiple fields in a colum in Magento admin panel grid? first appeared on naveenOS.]]>
https://www.naveenos.com/2012/05/magento-how-to-merge-multiple-fields-in-a-colum-in-magento-admin-panel-grid/feed 1
Zend: How to use multiple conditions at delete time? https://www.naveenos.com/2011/09/zend-how-to-use-multiple-conditions-at-delete-time https://www.naveenos.com/2011/09/zend-how-to-use-multiple-conditions-at-delete-time#respond Tue, 20 Sep 2011 14:14:29 +0000 http://naveenos.com/?p=394 Zend provides a facility to delete a row from the database table using the delete() method. This method takes one argument, which is an SQL expression that is used in a WHERE clause, as criteria for the rows to delete. For example : $modelObj = new ModelName(); $where = $modelObj >getAdapter()->quoteInto('id = ?', '1235'); $modelObj […]

The post Zend: How to use multiple conditions at delete time? first appeared on naveenOS.]]>
https://www.naveenos.com/2011/09/zend-how-to-use-multiple-conditions-at-delete-time/feed 0
Ubuntu: How to start and stop LAMP server https://www.naveenos.com/2011/05/ubuntu-how-to-start-and-stop-lamp-server https://www.naveenos.com/2011/05/ubuntu-how-to-start-and-stop-lamp-server#comments Tue, 10 May 2011 13:22:26 +0000 http://naveenos.com/?p=351 To view any changes in php.ini file or some LAMP server files we should restart the apache server again.  and you can do this by following commands: sudo /etc/init.d/apache2 stop sudo /etc/init.d/apache2 start Above both commands will stop the apache server and start again. But you can do restart apache server by single command only: […]

The post Ubuntu: How to start and stop LAMP server first appeared on naveenOS.]]>
https://www.naveenos.com/2011/05/ubuntu-how-to-start-and-stop-lamp-server/feed 2
MySQL: How to delete X day old entries https://www.naveenos.com/2011/03/mysql-how-to-delete-x-day-old-entries https://www.naveenos.com/2011/03/mysql-how-to-delete-x-day-old-entries#respond Thu, 10 Mar 2011 07:51:09 +0000 http://naveenos.com/?p=339 In some cases we need to remove old entries from the database or remove entries before specific days. So mysql provides the syntax to delete records: DELETE FROM $table_name WHERE $date_field < date_sub(CURDATE(), $numberOfDays day) If above query does not work for you then its version issue. So you can do same thing like this: […]

The post MySQL: How to delete X day old entries first appeared on naveenOS.]]>
https://www.naveenos.com/2011/03/mysql-how-to-delete-x-day-old-entries/feed 0
MySQL: Remove duplicate entry from the databse keeping one record https://www.naveenos.com/2011/02/mysql-remove-duplicate-entry-from-the-databse-keeping-one-record https://www.naveenos.com/2011/02/mysql-remove-duplicate-entry-from-the-databse-keeping-one-record#comments Mon, 14 Feb 2011 10:39:10 +0000 http://naveenos.com/?p=320 Sometimes we written a code to enter some dynamic entry in the table but did not want to enter duplicate records for same id ( not primary field). and we found that we have entered many records in the table and not it is not possible to delete record manually. For this we can run […]

The post MySQL: Remove duplicate entry from the databse keeping one record first appeared on naveenOS.]]>
https://www.naveenos.com/2011/02/mysql-remove-duplicate-entry-from-the-databse-keeping-one-record/feed 1
Magento : add two column value in collection https://www.naveenos.com/2010/08/magento-add-two-column-value-in-collection https://www.naveenos.com/2010/08/magento-add-two-column-value-in-collection#comments Mon, 30 Aug 2010 07:50:08 +0000 http://naveenos.com/?p=232 many times we need to do operation on two column values and show in the admin panel. for this we have to follow these steps: 1. Add column in your Grid.php file: 2. Now create a folder in the AdminHtml folder with name ‘Renderer’ 3. Create a new php file with name ‘Qty.php’ 4. Write […]

The post Magento : add two column value in collection first appeared on naveenOS.]]>
https://www.naveenos.com/2010/08/magento-add-two-column-value-in-collection/feed 1
Magento: How to retrieve products with a specific attribute? https://www.naveenos.com/2010/08/magento-how-to-retrieve-products-with-a-specific-attribute https://www.naveenos.com/2010/08/magento-how-to-retrieve-products-with-a-specific-attribute#comments Fri, 20 Aug 2010 10:25:58 +0000 http://naveenos.com/?p=223 Mostly all Models in the Magento have a corresponding Collection object that can be used to fetch multiple instances of a Model. To instantiate a Product collection, do the following $collection = Mage::getModel('catalog/product')->getCollection(); Products are a Magento EAV style Model, so you’ll need to add on any additional attributes that you want to return. $collection […]

The post Magento: How to retrieve products with a specific attribute? first appeared on naveenOS.]]>
https://www.naveenos.com/2010/08/magento-how-to-retrieve-products-with-a-specific-attribute/feed 1
Print magento Sql at run time https://www.naveenos.com/2010/08/print-magento-sql-at-run-time https://www.naveenos.com/2010/08/print-magento-sql-at-run-time#comments Thu, 05 Aug 2010 11:21:58 +0000 http://naveenos.com/?p=175 Any developer wants to check what sql is executing during page load. so he can check and identify the getting errors: To print the sql go to folder : app\code\core\Mage\Catalog\Model\ and open file Layer.php search the function : and replace : to and save and run front page again… you will see all Sqls are […]

The post Print magento Sql at run time first appeared on naveenOS.]]>
https://www.naveenos.com/2010/08/print-magento-sql-at-run-time/feed 1
Create multilanguage site https://www.naveenos.com/2010/06/create-multilanguage-site https://www.naveenos.com/2010/06/create-multilanguage-site#comments Mon, 21 Jun 2010 10:53:09 +0000 http://naveenos.com/?p=141 To create a site in multiple languages you should do two main things : Write this code after connection created in database file : mysql_query ( ‘SET character_set_connection=utf8, character_set_results=utf8, character_set_client=binary;’, $connectionID ); And write below code in common file which use in complete site : header(‘Content-Type: text/html; charset=ISO-8859-1’); Tweet This Post

The post Create multilanguage site first appeared on naveenOS.]]>
https://www.naveenos.com/2010/06/create-multilanguage-site/feed 2