模型的时间戳自动写入支持timestamp类型字段

This commit is contained in:
thinkphp
2016-05-12 21:53:54 +08:00
parent 67cebd8ca1
commit c3af0bb1c4
5 changed files with 29 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ class Sqlite extends Connection
*/
public function getFields($tableName)
{
$this->initConnect(true);
list($tableName) = explode(' ', $tableName);
$sql = 'PRAGMA table_info( ' . $tableName . ' )';
$pdo = $this->linkID->query($sql);