Timeline for how to connect another database from magento
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 11, 2018 at 1:09 | comment | added | Adarsh Khatri |
Is there similar solution for M2 without editing env.php . DB configuration should be done inside the module itself like this.
|
|
Nov 22, 2013 at 11:32 | comment | added | bab | I have a little knowledge of xml code.please tell me where is the problem and what will be the controller file for this(Is controller is necessary for it or not?) I type the sql query in header.phtml(IS this file is the right place for query?) I have an error Exception printing is disabled by default for security reasons. Error log record number: 933266064 I can't understand this. | |
Nov 22, 2013 at 11:31 | comment | added | bab | <test_write><connection><use>new_db</use></connection> </test_write><test_read><connection><use>new_db</use> </connection></test_read><test_setup><connection> <use>new_db</use></connection></test_setup></resources><models><test> <class>SmashingMagazine_LogProductUpdate_Model</class> <resourceModel>LogProductUpdate_resource</resourceModel> </test><test_resource><class>SmashingMagazine_LogProductUpdate_Model_Resource</class><entities><test><table>users</table></test></entities> </test_resource></models></global></config> | |
Nov 22, 2013 at 11:27 | comment | added | bab | My config.xml is <config><modules> <SmashingMagazine_LogProductUpdate> <version>0.0.1</version> </SmashingMagazine_LogProductUpdate> </modules><global><resources><new_db> <connection> <host><![CDATA[localhost]]></host> <username><![CDATA[root]]></username> <password><![CDATA[]]></password> <dbname><![CDATA[survey]]></dbname> <model>mysql4</model> <type>pdo_mysql</type> <active>1</active> </connection> </new_db> | |
Nov 22, 2013 at 10:56 | comment | added | bab | <?xml version="1.0"?> <config> <modules> <SmashingMagazine_LogProductUpdate> <version>0.0.1</version> </SmashingMagazine_LogProductUpdate> </modules> <global> | |
Nov 18, 2013 at 12:30 | comment | added | David Manners | @bab the second config.xml example should work for the model. did you get any errors with the code? | |
Nov 18, 2013 at 10:22 | comment | added | bab | I am making a single query but if possible through model also.Actually i am working on a survey site . i want to access databse of this site through magento.I read so many articles for the same but i have no idea where to put this code .If possible please tell me what changes i can make in your coding to get desired result.Thanks. | |
Nov 18, 2013 at 7:39 | comment | added | David Manners | @bab are you wanting to make a single query or a model that works with another database? | |
Nov 18, 2013 at 6:01 | comment | added | bab | I don't understand where to write this code,where to perform query and what to chage in this.for example wether i type <host><![CDATA[localhost]]></host> or <host>localhost</host> etc. | |
Nov 18, 2013 at 5:53 | comment | added | bab | sorry,It does not work for me. | |
Nov 7, 2013 at 20:08 | history | edited | David Manners | CC BY-SA 3.0 |
add description of host options and correct spelling mistakes
|
Nov 7, 2013 at 20:02 | history | edited | David Manners | CC BY-SA 3.0 |
add description of host options
|
Nov 7, 2013 at 15:07 | history | answered | David Manners | CC BY-SA 3.0 |