我在迁移到PDO之前使用了这段代码:
if (class_exists('SQLiteDatabase')) {
return 'jargon.db';
} else if (class_exists('SQLite3')) {
return 'jargon3.db';
} else {
throw new Exception('SQLite not installed');
}
如何使用PDO
进行相同的操作答案 0 :(得分:3)
要检查SQLite版本,您可以使用以下代码:
$scope.amount = function(newValue) {
return arguments.length ? ($scope._amount = newValue) : $scope._amount;
};