在cpanel主机中上传symfony2项目后的嗨:
执行时发生异常。
SELECT COUNT(*) AS dctrn_count FROM (SELECT DISTINCT id0 FROM (SELECT n0_.id AS id0, n0_.type AS type1, n0_.annoDate AS annoDate2, n0_.solarDate AS solarDate3, n0_.title AS title4, n0_.body AS body5, n0_.bodyMore AS bodyMore6, n0_.fileName AS fileName7, n0_.user_username AS user_username8 FROM NewsOrNotification n0_ WHERE n0_.type = 1 ORDER BY n0_.annoDate DESC) dctrn_result) dctrn_table:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'darspard_h4mit.NewsOrNotification' doesn't exist
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'darspard_h4mit.User' doesn't exist
in .../vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php at line 646 -+
$stmt->execute($params);
}
} else {
$stmt = $this->_conn->query($query);
}
} catch (\Exception $ex) {
throw DBALException::driverExceptionDuringQuery($ex, $query, $this->resolveParams($params, $types));发布于 2014-12-02 05:39:32
我在Windows操作系统上的开发环境不区分大小写,但Linux服务器区分大小写。因此,重命名的表以相同的名称、实体和我的问题得到了解决。例如:
表新通知将名称更改为newsornotification
发布于 2014-12-01 08:04:02
运行php app/console doctrine:schema:update --force。如果无法访问控制台,请上载在dev环境中生成的“就绪和干净”数据库
https://stackoverflow.com/questions/27222557
复制相似问题