Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 关于magento中的数据库自定义模块_Php_Magento - Fatal编程技术网

Php 关于magento中的数据库自定义模块

Php 关于magento中的数据库自定义模块,php,magento,Php,Magento,如果我在magento中的模块名为quote,请查看生成数据库的代码: <?php $installer = $this; $installer->startSetup(); $installer->run(" -- DROP TABLE IF EXISTS {$this->getTable('quote')}; CREATE TABLE {$this->getTable('quote')} ( `quote_id` int(11) unsigned N

如果我在magento中的模块名为
quote
,请查看生成数据库的代码:

<?php

$installer = $this;

$installer->startSetup();

$installer->run("

-- DROP TABLE IF EXISTS {$this->getTable('quote')};
CREATE TABLE {$this->getTable('quote')} (
  `quote_id` int(11) unsigned NOT NULL auto_increment,
  `product_id` int(11) unsigned NOT NULL,
  `name` varchar(255) NOT NULL default '',
  `surname` varchar(255) NOT NULL default '',
  `mail` varchar(255) NOT NULL default '',
  `message` text NOT NULL default '',
  `status` smallint(6) NOT NULL default '0',
  `created_time` datetime NULL,
  `update_time` datetime NULL,
  PRIMARY KEY (`quote_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    ");

$installer->endSetup();

您在config.xml中称它为什么?大致如下:

    <models>
        <quote_mysql4>                
            <entities>
                <quote>
                    <table>table_name</table>
                </quote>
            </entities>
        </quote_mysql4>    
    </models>

表名称