1

我正在使用 zf2 与教义 orm 模块和 sqlite3 数据库。当我从数据库中获取数据时,出现如下错误:

执行“SELECT t0.id AS id1, t0.email AS email2, t0.password AS password3, t0.fname AS fname4, t0.lname AS lname5, t0.mobile AS mobile6 FROM user t0”时发生异常:

SQLSTATE[HY000]: 一般错误: 1 no such table: user

我的 global.php 文件在这里:

<?php


return array(
'doctrine' => array(
    'connection' => array(
        'orm_default' => array(
                'driverClass' => 'Doctrine\DBAL\Driver\PDOSqlite\Driver',
                'params' => array(                                      'dsn'  =>  __DIR__ . '/data/intranet.db',     
                            )
                    )
            )
    ),
    
);

你能回答我是对还是错?谢谢,,,,,,

4

1 回答 1

5

'doctrine' => array(
    'connection' => array(
        'orm_default' => array(
            'driverClass' => 'Doctrine\DBAL\Driver\PDOSqlite\Driver',
            'params' => array(
                'path'=> __DIR__.'/../../data/database name',
            )
        )
    )
),

);

于 2012-11-24T05:58:33.627 回答