Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7032195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:54:11+00:00 2026-05-28T00:54:11+00:00

I have created a custom module that creates a custom Database table. I have

  • 0

I have created a custom module that creates a custom Database table. I have been following Alan Storm’s tutorials http://alanstorm.com/magento_setup_resources and http://alanstorm.com/magento_models_orm in order to create custom Database tables.

My module entry gets showed up in core_resource table but the actual doesn’t get showed up.

This is my config.xml code

<?xml version="1.0"?>
<config>
 <modules>
    <Ajzele_SimpleModel>
        <version>0.0.1</version>
    </Ajzele_SimpleModel>
</modules>
<global>

  <models>
   <simplemodel>
     <class>Ajzele_SimpleModel_Model</class>
     <resourceModel>simplemodel_mysql4</resourceModel>      
   </simplemodel>

   <simplemodel_mysql4>
     <class>Ajzele_SimpleModel_Model_Mysql4</class>
      <entities>
          <simplemodel>
                  <table>simplemodel</table>
           </simplemodel>
       </entities>                
   </simplemodel_mysql4>  

 </models>

 <resources>
        <simplemodel_setup>
            <setup>
                <module>Ajzele_SimpleModel</module>
       <class>Ajzele_SimpleModel_Model_Mysql4_Setup</class>
            </setup>

            <connection>
                <use>core_setup</use>
            </connection>

        </simplemodel_setup>

        <simplemodel_read>
            <connection>
                <use>core_read</use>
            </connection>
        </simplemodel_read>  

        <simplemodel_write>
            <connection>
                <use>core_write</use>
            </connection>
        </simplemodel_write>  

</resources>        
</global>    
    </config>

And my Model file Structure is

   Model
     SimpleModel.php
     Mysql4
       SimpleModel.php
       Setup.php
       SimpleModel
          Collection.php

Here’s teh contents of my sql/simplemodel_setup/mysql4-install-0.0.1.php

     <?php

    $installer = $this;

   $installer->startSetup();

   $baseTableName = 'simplemodel';

   $sql = "
   SET FOREIGN_KEY_CHECKS=0;
   -- ----------------------------
   -- Table structure for `simplemodel`
   -- ----------------------------
   DROP TABLE IF EXISTS {$this->getTable($baseTableName)};
   CREATE TABLE {$this->getTable($baseTableName)} (
    `simplemodel_id` int(11) NOT NULL AUTO_INCREMENT,
    `field1` varchar(255) DEFAULT NULL,
    `field2` varchar(255) DEFAULT NULL,
     PRIMARY KEY (`simplemodel_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    ";

    $installer->run($sql);

    $installer->endSetup();

I have tried various debugging methods, but I get neither any exception nor an error. What should I do in order to get my table actually show up in Database?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:54:11+00:00Added an answer on May 28, 2026 at 12:54 am

    I recommend you put Magento in developer mode and debug the trace of XML to check the XML. To configure Magento in developer Mode you should put the variable MAGE_IS_DEVELOPER_MODE in the definition of the virtual host or in the .htaccess of the Magento root.
    For example in de virtual host:

    <VirtualHost *:80>
       DocumentRoot "C:\Program Files\Zend\Apache2/htdocs/local.pruebas.com"
       ServerName local.pruebas.com
       DirectoryIndex index.html index.php index.htm
       SetEnv MAGE_IS_DEVELOPER_MODE "1"    
       <Directory "C:\Program Files\Zend\Apache2/htdocs/local.pruebas.com">
           AllowOverride All
           Options All
           Order allow,deny
           Allow from all
       </Directory>
    

    later you should modify index.php in the line 66 and put

    if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Varien_Profiler::enable();
        Mage::setIsDeveloperMode(true);
        ini_set('display_errors', 1);
     }
    

    Varien_Profiler::enable(); and ini_set(‘display_errors’, 1); is out of conditional i think for mistake.
    Now, you can´t see the simplexml_load_string() error whent have an error in the XML:

    Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 4: parser error : error parsing attribute name in C:\Program Files\Zend\Apache2\htdocs\local.pruebas.com\lib\Varien\Simplexml\Config.php on line 510……

    then, its time to debug
    1.first: go to app/etc/Ajzele_SimpleModel and force and error, for example:

    <config>
         <modules>
            <Ajzele_SimpleModel <!--remove a '>' to force an error-->
               <active>true</active>
               <codePool>local</codePool>
            </Ajzele_SimpleModel>
         </modules>
    </config>
    

    you should see the error.

    2.second: go to app/code/local/Ajzele/SimpleModel/etc/config.xml and retry the process

    <config>
        <modules>
          <Ajzele_SimpleModel <!-- remove a '>' to verify that you load correctly your extension 
              <version>0.0.1</version>
          </Ajzele_SimpleModel>
        </modules>
        <global>
    
          <models>
              <simplemodel>
                   <class>Ajzele_SimpleModel_Model</class>
                      <resourceModel>simplemodel_mysql4</resourceModel>      
              </simplemodel>
          </models>
         </global>
     </config>
    

    if you don´t have simple xml error in this point you don´t load correctly your extension, and the next step is debug and debug config.xml

    This isn´t a concrete answere, but i think that you can see whith the solution with this.
    thanks,sorry for my inglish

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a few custom tables in my Drupal database that were created manually.
I have a Drupal 7 module that creates a custom node type. It's working,
I have a module that creates several admin/settings/modname pages. I created a new role.
I have been working on a custom module for Magento (ver. 1.8.0.0) that shows
friends, i have created custom title bar using following titlebar.xml file with code <?xml
I have created a custom workflow activity that copies attachments from a case to
I have created a custom tag that looks like this: def textField = {
I have a module that is used by creating a custom class loader. The
I have created a custom module and am using hook_block to programmatically create some
I have created a custom TaskButton control that takes an image and text. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.