From 3b79ec85d95d34c826142e1624fbe354eee30e4b Mon Sep 17 00:00:00 2001 From: markjcrane Date: Fri, 29 Apr 2016 11:21:26 -0600 Subject: [PATCH] Add the missing function to pdo.php. --- resources/pdo.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/resources/pdo.php b/resources/pdo.php index ecf95baa87..9436ea0970 100644 --- a/resources/pdo.php +++ b/resources/pdo.php @@ -153,6 +153,28 @@ if ($db_type == "sqlite") { return substr($string, (strlen($string)-$num), strlen($string)); } } + if (!function_exists('php_sqlite_data_type')) { + function php_sqlite_data_type($string, $field) { + + //get the string between the start and end characters + $start = '('; + $end = ')'; + $ini = stripos($string,$start); + if ($ini == 0) return ""; + $ini += strlen($start); + $len = stripos($string,$end,$ini) - $ini; + $string = substr($string,$ini,$len); + + $str_data_type = ''; + $string_array = explode(',', $string); + foreach($string_array as $lnvalue) { + $fieldlistarray = explode (" ", $value); + unset($fieldarray, $string, $field); + } + + return $str_data_type; + } + } //database connection try {